Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Alberto on February 26, 2020, 08:51:31 AM

Title: Loop Time Events
Post by: Alberto on February 26, 2020, 08:51:31 AM
Hello, I have XML, in the following format: Time, ID, Rotation. The goal is to create an object according to the Time field. For example, when the game starts, an object is created within two seconds. In the second 2.5, another object, in the 4, another and so on. Can someone help me by giving a light on how to trigger the event according to the elapsed time? Thank you in advance
Title: Re: Loop Time Events
Post by: djaydino on February 26, 2020, 09:27:43 AM
Hi.
To use in runtime i would suggest to get the xml @ start and convert to arrays or hashtables.
As xml is a bit slow to use during gameplay.

To get data from xml you can use Datamaker (ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))
and for arrays and hashtable use Array Maker (ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))

Then get time on index 0 and store in a variable, then use a wait.
Then for next one get time on index 1 and subtract index 0 and use wait again with the result.
Then next index 2 and subtract index 1, do wait.
and so on

Title: Re: Loop Time Events
Post by: Alberto on February 26, 2020, 09:35:38 AM
Thank you, I will try it