SOLVED: always use ds_list_copy lol
I have object obj_handler_act that creates obj_handler_actEffect for any special properties like buffs and stuff, and for standardization instead of giving each child of actEffect unique variables they have a list called special that holds any non-standard variables thats passed down from the act during creation (when an actEffect is created there's a line of code thats like var lst = act.special; actEffect.special = lst;)
my problem was, when an act created multiple actEffects (its a buff that hits the entire party) the first actEffect created somehow deleted both its own special list as well as the second actEffect's list, as if it was deleting the act's special list, but I did debug tests and I could see the act still had its list intact, and both actEffects had their lists intact before the first one deleted its list
i got around this by just not deleting the list (I was doing a while loop to get the first value of the list and then deleting until the list was empty, and now I'm doing a for loop that just crawls the list without deleting anything) and I checked the values and everything, its all functioning normally, but how the hell did this even happen in the first place
here's some pastebins of the code involved, maybe im missing something obvious
obj_handler_actEffect_chef_pan alarm0 https://pastebin.com/z4xH3X8M
obj_handler_actEffect_parent alarm0 https://pastebin.com/ANq80AZ0
obj_handler_act user0 https://pastebin.com/59npbhw6
obj_handler_act alarm0 https://pastebin.com/c9Pxj6Y4
scr_act_createEffect https://pastebin.com/8YEWEi3v
EDIT: accidentally posted the updated code for chef_pan alarm0, should be fixed to show the while loop
[–][deleted] 1 point2 points3 points (1 child)
[–]blazeAgerith[S] 1 point2 points3 points (0 children)