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.

Messages - PET

Pages: 1 ... 8 9 [10]
PlayMaker Help / Re: Send an event to another object?
« on: August 26, 2015, 11:10:07 AM »
Thanks. I was thinking on doing it like this but the Specify Game Object... I have 4 wheels since the wheel is not a prefab. But thinking about it... all I have ot do is just sent 4 events to each wheel in particular. I did a test with "Broadcast All" and it works.

I did a Global Event called "startWheelRotation" but I did that in my main State Machine and not on the wheels.

But it makes sense now. The event from the wheels has to be started by something.

Thinking about it, does it matter where I set up the Event considering that it's Global?

My "Restart level" action behaves very strange. It seems that every time I restart the level I get a "time" value randomly and my objects are kind of never on the same spot. The car is a bit forward then a bit back... then forward again... our programmer will look into it. It might be a Unity bug.

Thanks for explaining. Events make more sense now. Event is something that... HAPPENS. When an Event happens it will go into the State it was setup to go. It doesn't matter where that Event happens... it can be sent from other States, other FSM and even a trigger.

Basically that's what a trigger does... it SENDS and event when somethign enter/exits/etc from him.


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".

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:

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.


1. How can I sent an event from one FSM to the other. I'm doing something like this:
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 ... 8 9 [10]