playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Custom Action with OnFixedUpdate - How to send event from within? [SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Custom Action with OnFixedUpdate - How to send event from within? [SOLVED] (Read 2135 times)
ScriptGeek
Playmaker Newbie
Posts: 3
Custom Action with OnFixedUpdate - How to send event from within? [SOLVED]
«
on:
January 02, 2015, 03:20:06 PM »
I have 2 FSMs setup and one of them has global events configured and the other has a custom action that uses OnFixedUpdate and within this OnFixedUpdate method it calls Fsm.Event() to send an event to the other FSM with the global events; however, the events are never sent. The custom action needs to run every physics step.
I've used debug statements to troubleshoot and nothing happens when the call to Fsm.Event happens. Any ideas on why this could be? Is there any example code I can look at that successfully sends events from OnFixedUpdate?
«
Last Edit: January 12, 2015, 03:05:02 AM by ScriptGeek
»
Logged
ScriptGeek
Playmaker Newbie
Posts: 3
Re: Custom Action with OnFixedUpdate - How to send event from within?
«
Reply #1 on:
January 02, 2015, 05:15:23 PM »
Ok, so I read "How to create a global event",
http://hutonggames.com/playmakerforum/index.php?topic=1762.0
, since I think that might be my problem. My custom script doesn't send events every frame, only when it needs to send one, which should be very reasonable with not even once per second on average. I'll keep searching for a solution.
Logged
ScriptGeek
Playmaker Newbie
Posts: 3
Re: Custom Action with OnFixedUpdate - How to send event from within?
«
Reply #2 on:
January 02, 2015, 09:43:16 PM »
I figured it out. I have my global events setup incorrectly, they were attached to the wrong state, a state which did nothing... which didn't help me solve the problem, but was a great troubleshooting experience.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Custom Action with OnFixedUpdate - How to send event from within? [SOLVED]