playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - PET

Pages: 1 2 [3]
31
PlayMaker Help / Send an event to another object?
« on: August 26, 2015, 09:30:09 AM »
Hello guys,

there are a couple of things that I'm trying to do.

I have 3 States...

Welcome State
Scale 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 Game
Activate 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 Game
This 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.png

What 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.png

Basically 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.png
Main 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



Pages: 1 2 [3]