Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: vidi on February 11, 2013, 07:15:47 AM

Title: What is the action for every x.secound?
Post by: vidi on February 11, 2013, 07:15:47 AM
I am new to Playmaker, but I have use construt2 (2d engine) already

I try to figure out

What is the action for every x.secound?

example
add 1 value  every 1 secound  to a variable

Maybe a stupid question, but I have no clue how I should  this do in playmaker.  ???
Title: Re: What is the action for every x.secound?
Post by: Andrew.Lukasik on February 11, 2013, 09:31:44 AM
Hi vidi,
Make two states connected with each other both using (system) event "FINISHED".
In first you place action <Wait> with filled delay time (your x) and finish event field as "FINISHED".
In second state use action <Float Add> or <Int Add> to add value to variable (created via tab Variables).

That should make you simple loop with delayed repeat. That's it.

A.
Title: Re: What is the action for every x.secound?
Post by: vidi on February 11, 2013, 12:41:08 PM
I get not a loop if I follow you suggestion, but I have now two States with the same  actions. Also  with a wait action in both and it works now

Thank you for push me in the right direction :)
Title: Re: What is the action for every x.secound?
Post by: vidi on February 12, 2013, 03:04:57 AM
I now know why the loop did not work out of your proposal.
I have update the wait file and it works nicely now

http://hutonggames.com/playmakerforum/index.php?topic=2700.0 (http://hutonggames.com/playmakerforum/index.php?topic=2700.0)

Thank you again ! :)