Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fome on November 12, 2014, 02:05:42 PM

Title: [SOLVED] Detect if an object is present in playmaker?
Post by: Fome on November 12, 2014, 02:05:42 PM
Hi everyone,

Did some searching on the forums and on google and wasn't able to find anything that uses playmaker's ready-made actions.

How do you detect if a game object with a specific tag is in a scene?

I have an object that I want to behave differently if there's an "enemy" in the scene or if there's none.

I'm imagining it's something to do with "Find Game Object" and then some sort of compare or test but I'm just not getting it.

Any help would be much appreciated!
Title: Re: Detect if an object is present in playmaker?
Post by: jeanfabre on November 13, 2014, 03:12:26 AM
Hi,

 yes, simply use "Find GameObject" and if the result if null using "Gameobject Compare" using the variable you used in "find Gameobject" against null.

 Bye,

 Jean
Title: Re: Detect if an object is present in playmaker?
Post by: Fome on November 14, 2014, 07:20:33 PM
"Game object is null"

Who knew?

Thanks Jean!