Hello guys,
there are a couple of things that I'm trying to do.
I have 3 States...
Welcome StateScale Time = 0
Get Key Down = Return
Basically when the game starts I pause the whole game, I display an UI Text and I wait for the "Return Key".
Run GameActivate Game Object (I deactivate the UI Text)
Scale Time = 1
Get Key Down = Return (For testing purposed, when pressed I send the last event)
End GameThis event will trigger when my object will reach the end of the level. I will do it with a trigger. Currently this event is activated by pressing Return when in "Run Game" state. Also currently this event is doing a
RESTART LEVEL and it sends the machine back to the "Welcome State".
http://puu.sh/jPmbW/5756b8f03c.pngWhat I want to do is... when I'm in "
Run Game" state I want to sent an event to my car wheels.
This is the FSM of the Car Wheels:
http://puu.sh/jPmd7/51f27c7062.pngBasically I want them to wait for that Event that is being sent by the "Run Game"... and when that event is received I want to go into the second state "Wheel Rotation" and basically "animate" my wheels. it's just an X Rotation.
Questions:
1. How can I sent an event from one FSM to the other. I'm doing something like this:
http://puu.sh/jPmhp/5b876990e7.pngMain problem is that I don't know how to make the Wheels to "LISTEN" for that startWheelRotation event. How do I do this? All tutorials are doing something similar with "Trigger Event" but that requires a rigidbody and it dosn't really apply to me.
So how to do it?
2. Am I doing the restart procedure of my level correctly? I'm building a demo basically and I want to be able to restart the whole game when my car reaches the end of the level.
Thank You