playMaker

Author Topic: [SOLVED] Detect if an object is present in playmaker?  (Read 2534 times)

Fome

  • Playmaker Newbie
  • *
  • Posts: 14
[SOLVED] Detect if an object is present in playmaker?
« 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!
« Last Edit: November 14, 2014, 07:20:50 PM by Fome »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Detect if an object is present in playmaker?
« Reply #1 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

Fome

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Detect if an object is present in playmaker?
« Reply #2 on: November 14, 2014, 07:20:33 PM »
"Game object is null"

Who knew?

Thanks Jean!