0

Add to List Variable does not work On Start

Crispy 2 weeks ago in Game Creator updated 3 days ago 2

The following works, but if you set the Trigger to On Start, it will not work.

Unity version:
Game Creator version:
1.0.4

Answer

+1
Answer

The Local Variables initialize at the same time as the Trigger, so depending on the execution order it might be that the Local Variable's init process takes place after the Trigger, overwriting any values previously set.

Simply add a "Wait" Action with 0.1 seconds and should solve the issue.

+1
Answer

The Local Variables initialize at the same time as the Trigger, so depending on the execution order it might be that the Local Variable's init process takes place after the Trigger, overwriting any values previously set.

Simply add a "Wait" Action with 0.1 seconds and should solve the issue.

Yep, Wait 0 seconds works as well (thanks @kingofzombies)