Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: VascBogdan on February 07, 2015, 09:49:50 AM
-
Is there a way/action to find if an object exists in the scene ? For example, when a gameobject (usually enemy) dies (destroy self) I want to start a new state. (there are different FSMs)
The gameobj. is stored as a GameObject variable but how can I do this ?
-
You could se Find Game Object and test if Game Object is Null.
Alternatively, you could create an INT Var and add each time you create an enemy and subtract from it each to you destroy an enemy. Then you can check the INT var total to see if there are active enemies.
I think you need include a little more info about what you are trying to accomplish.
-
But how can I exactly test if the GameObject is null ? I believe this is the solution I want, but how ?
-
Search for "Game Object is Null" in the logic category of Actions.
You can fire an event if null (false) or is not null (true).
-
Yes, that's it. I searched for "GameObject" instead of "Game Object" and I didn't even think it can be in Logic, instead of GameObject or something. I am now trying it and edit if something is wrong. Thank you!
edit: Worked extremely fine. Thank's again!