Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: indeed on April 02, 2019, 10:20:15 AM

Title: Array Contains update order?
Post by: indeed on April 02, 2019, 10:20:15 AM
Hi I'm having an issue with Array Contains index properly updating. I have a variable updating Every Frame that Array Contains checks for, but the Index position does not update (despite the Value correctly updating). This is all within one state.

However, if I add a second state only containing a Wait action (time 0.01), this two state loop causes the Index number to correctly update within Array Contains. Does Array Contains need to be Late Update? I'd just rather avoid using these kinds of loops.
Title: Re: Array Contains update order?
Post by: djaydino on April 03, 2019, 01:30:33 AM
Hi.

Array Contains does not work every frame and is best not to.

What you can do is use "Game Object Changed" to check if your object on your variable has changed, then do Array contains.


For looping you should use a 'Next Frame Event' instead of a 'Wait' action :)