Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: neversuki on January 06, 2014, 10:41:53 PM

Title: how to get the tag when an object is hit by another?
Post by: neversuki on January 06, 2014, 10:41:53 PM
I set 3 tags in the engine, player, other, invincible.
When my character in different status(tags), the objects in the world will give different responses after hit by him.

Now i have to set 3 playmaker components on objects.
I think the better way is let the objects know which tag he hit, and compare the tags, and lead to different response. but i can't find the playmaker actions like this.

Is playmaker give some actions to do like this?

sorry for my poor English, thank you.
Title: Re: how to get the tag when an object is hit by another?
Post by: jeanfabre on January 07, 2014, 05:05:37 AM
Hi,

 Few things.

 You can use the action "get tag" on any gameobjects, so that's a good way to check then using "String compare" action.

Also, if you want to use triggers and collisions events, use "Trigger Event" action and "Collision Event" action, because they allow you to filter by tag so you could define logic that you know will only triggers based on a specific tag.

bye,

 Jean