PlayMaker Help & Tips > PlayMaker Tips & Tricks

Game Mechanic - Help

(1/1)

halas:
Hey guys,

Total noob here.

I am trying to get this mechanic to work that I believe is super simple but its nagging me with issues.

My game is top-down perspective. I need to have it so if my character walks over an area that is red, to die.

So I have this platform that the character must cross, it is currently:
Red
Wait - 1 sec
Material Color - Red
Collision Event - Death
Green
Wait - 1 sec
Material Colour - Green

I am having this loop. The issue is now, to have collision event I need a collider, but if I have a collider, my character cannot walk on the platform.

Any thoughts?

djaydino:
Hi,
You need to set 'is trigger' on a collider to be able to pass thru.
And use 'trigger' actions.

tcmeric:
PS, you can have two colliders on an object or have a child object which holds a second collider.

Ie, 1 for the floor (which is a normal colider) and a 2nd one for the trigger area (which is a collider set to trigger).

halas:
Thanks for the help guys.

Am I using Bool Values for If statements?
For example,
If (Variable) is true, activate - Trap
If (Variblee) is False, do nothing.

djaydino:
Hi,
That depends on how you set it up and how you want it to work.

You could use a bool test after a trigger event to look if active or not,

or you could enable/disable the trigger(collider)

or you could have state 1 with a wait and a trigger event and then when wait is done go to next state with only a wait.
when that wait is done go back to state 1.

on state 1 have a 2nd transition for the trigger (for your trap).

Navigation

[0] Message Index

Go to full version