playMaker

Author Topic: Send Event Delay  (Read 5703 times)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Send Event Delay
« on: September 17, 2012, 01:26:51 PM »
I just found an error i think.. I have a Send Event with a 20 second delay to reset some animations kind of in a loop..

So at 20 sec it jumps to another state and then back to this one to reset the animations and other things to the beginning etc..

So it runs fine if i just start it up and run it.. now if i click another object that causes this FSM to jump to another state of waiting it is like the timer for the send even is messed up.. after this it now triggers after 8 to 14 seconds or something.. kind of random.

I honestly dont remember what version i am running at the moment. I have not been doing any beta testing that i know of.. so probably just the latest stable normal release.. Unless there is a new one lately which i have not updated to..

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #1 on: September 17, 2012, 01:30:45 PM »
I just posted via the bug reporting menu.. sorry i just noticed that post.

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #2 on: September 17, 2012, 07:14:52 PM »
sent another bug report with reproduction instructions.

I hope it is just my version or something.. its killing my final version for my client.. Maybe i can figure out a different way to code it.

Q

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Send Event Delay
« Reply #3 on: September 18, 2012, 04:11:55 AM »
Hi,

 Events fired with a delay WILL be fired, even if you exit the state. if that what you are experiencing?

 bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #4 on: September 18, 2012, 04:57:15 AM »
Really.......

That does not make any sense to me.. If you leave a state it should not be doing anything. And if you reenter a state it should start over and reset..

So i think what i am experiencing is some kind of multiple version of that delay running so each time i go in it starts a new copy of the delay timer or something.. Because when i go back in it triggers at all different kinds of times.. 4 sec 12 sec 8 sec etc... if i made a chart maybe i would see that there were multiple timers running and sending the event over and over all at staggered 20 sec delay times.

Q

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Send Event Delay
« Reply #5 on: September 18, 2012, 07:24:44 AM »
Hi,

 Yes, I think so too that it is misleading. I can't find an action I did that was fixing this problem, I'll send it as soon as I can find it,

bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #6 on: September 18, 2012, 07:31:17 AM »
Thanks Jean..

Yes so i just proved that it is creating new timers every time it enters that state.. that cant be good. I interrupted it at 10 sec on my 20 sec timer and then it fired every 10 sec.. so then i interrupted it at a 5 sec interval once or twice.. and now it is firing every 5 sec. So every time it enters that state it makes a new timer. And all of the old ones are still running as well..

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #7 on: September 18, 2012, 07:34:02 AM »
And i have never figured out why there is an Every Frame option in Send Event?

Just looking at the code now.

Q

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Send Event Delay
« Reply #8 on: September 18, 2012, 07:59:09 AM »
hi,

 found it,

 try this, and tell me if that works for you,

 bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Send Event Delay
« Reply #9 on: September 18, 2012, 08:14:09 AM »
Jean,

Thanks yours does work!!!

I made one too that is just the code from an older version of Send Event that i had modified for something else and i noticed that the delayed Event code was handled differently.. maybe there was a reason for that.

What do you think? Which one should i use?

Q

jerware

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Send Event Delay
« Reply #10 on: March 14, 2013, 03:20:48 PM »
Yikes! I just encountered this today, and I'm so glad this thread existed. Has Alex been made aware of it? Certainly multiple timers running concurrently is a bad thing. I agree that if you exit the state on another event, the timer should be destroyed.

I just noticed a "Kill Delayed Events" action exists. I suppose it's meant as a workaround for this problem, though its documentation link doesn't work.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Send Event Delay
« Reply #11 on: March 15, 2013, 07:14:05 AM »
Hi,

 thanks for the report, have you submitted a bug on that broken doc link? if not, I'll do it.

bye,

 Jean

jerware

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Send Event Delay
« Reply #12 on: March 15, 2013, 10:21:56 AM »
I just submitted a bug report about the documentation link. Also, thanks for the replacement Send Event action, which solves the original problem.