playMaker

Author Topic: Loop Time Events  (Read 1158 times)

Alberto

  • Playmaker Newbie
  • *
  • Posts: 3
Loop Time Events
« 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Loop Time Events
« Reply #1 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)
and for arrays and hashtable use Array Maker (ecosystem)

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


Alberto

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Loop Time Events
« Reply #2 on: February 26, 2020, 09:35:38 AM »
Thank you, I will try it