temnix Posted September 17, 2021 Share Posted September 17, 2021 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. Quote Link to comment
Ardanis Posted September 17, 2021 Share Posted September 17, 2021 (edited) 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 September 17, 2021 by Ardanis Quote Link to comment
Recommended Posts
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.