Jump to content

Weidu's deletes


temnix

Recommended Posts

Weidu's code for removing actors and other elements in an area seems to update references during the same operation, throwing off the order. If I write

LPF fj_are_structure INT_VAR fj_delete_mode = 0 STR_VAR fj_structure_type = ~actor~ END
LPF fj_are_structure INT_VAR fj_delete_mode = 1 STR_VAR fj_structure_type = ~actor~ END

I end up deleting not actors number 0 and 1, but 0 and 2. It's like after the first delete Weidu updates the order of actors, and the one who used to be number 2 moves up a line. To get the right features I must use

LPF fj_are_structure INT_VAR fj_delete_mode = 1 STR_VAR fj_structure_type = ~actor~ END
LPF fj_are_structure INT_VAR fj_delete_mode = 0 STR_VAR fj_structure_type = ~actor~ END

Discuss.
 

Link to comment

It updates the structure as soon as it's done changing it. Which sounds to me like expected behavior from a function🤔

I.e. I'm quite sure you can also achieve the same result with:

LPF fj_are_structure INT_VAR fj_delete_mode = 0 STR_VAR fj_structure_type = ~actor~ END
LPF fj_are_structure INT_VAR fj_delete_mode = 0 STR_VAR fj_structure_type = ~actor~ END

It does kinda complicates things when you want to delete multiple objects, though, that is true.

Edited by Ardanis
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...