Author Topic: Array Contains update order?  (Read 142 times)


  • Junior Playmaker
  • **
  • Posts: 73
    • View Profile
Array Contains update order?
« on: April 02, 2019, 07: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.


  • Administrator
  • Hero Member
  • *****
  • Posts: 4369
    • View Profile
    • jinxtergames
Re: Array Contains update order?
« Reply #1 on: April 02, 2019, 10:30:33 PM »

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 :)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions