Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dev_Sebas on August 19, 2011, 06:57:51 PM

Title: Trigger for only some objects?[SOLVED]
Post by: Dev_Sebas on August 19, 2011, 06:57:51 PM
Anybody knows how to set the objects can react with a trigger?
I think is with a Trigger Event but I can not work with him.
Thanks for any help.
Bye
Title: Re: Trigger for only some objects?
Post by: jeanfabre on August 20, 2011, 03:27:27 AM
Hi Trigger events triggers for any colliders.

 If you want to be selective, use the trigger event action instead.

 also look in the testlab, there are examples of this usage in the triggers folder.


 So for example if you wanted that dor to only react to the player but not ennemies, you tag the player with a newly created tag "player" and tag ennemies with "ennemies" and in the trigger event action you select "player", that way the door will only react to objects tagged "player"

also, don't forget to properly set up your colliders, and physics, else it jsut won't trigger even with normal scripts.
http://unity3d.com/support/documentation/ScriptReference/Collider.OnTriggerEnter.html (http://unity3d.com/support/documentation/ScriptReference/Collider.OnTriggerEnter.html)

If you are still stuck, I'll try to be more explicit :)


 Bye,

 Jean
Title: Re: Trigger for only some objects?
Post by: Dev_Sebas on August 20, 2011, 05:30:27 PM
Hi Jean
Thanks for help I think I have understand all but now I am not in my computer.
Maybe in 2 or 3 days I will be in home.
Bye
Title: Re: Trigger for only some objects?
Post by: Dev_Sebas on August 23, 2011, 08:48:28 PM
Oh hehe they work just perfect  ;D amazing help this community thanks a lot Jean
Bye
Title: Re: Trigger for only some objects?
Post by: jeanfabre on August 24, 2011, 01:24:20 AM
Your welcome!