Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: 4ppleseed on December 06, 2013, 11:15:56 AM

Title: How do I set a Gameobject variable to nothing?[SOLVED]
Post by: 4ppleseed on December 06, 2013, 11:15:56 AM
Hi, I want an On Touch Event Down to store the last touched object as a GameObject variable – no problems, so far.

Then when you let go, On Touch Event UP I want it to NULL out the GameObject  variable.

How do I set a Global GameObject variable to nothing/Null/empty?

Thanks.
Title: Re: How do I set a Gameobject variable to nothing?
Post by: 1982 on December 06, 2013, 06:04:31 PM
Hack solution: Create another new Gameobject which you save into that variable, and then destroy it.
Title: Re: How do I set a Gameobject variable to nothing?
Post by: escpodgames on December 06, 2013, 06:32:04 PM
Use the set gameobject action but don't enter a gameobject :)
Title: Re: How do I set a Gameobject variable to nothing?
Post by: Lane on December 06, 2013, 06:35:30 PM
Use the set gameobject action but don't enter a gameobject :)

this

undefined = null
Title: Re: How do I set a Gameobject variable to nothing?
Post by: 4ppleseed on December 10, 2013, 10:28:19 AM
Use the set gameobject action but don't enter a gameobject :)


Ahhhhh... that's so simple I couldn't see it. Thanks!
Title: Re: How do I set a Gameobject variable to nothing?[SOLVED]
Post by: TIGGYsmalls on January 09, 2014, 05:29:02 AM
Can anyone tell me why this isn't working?

The object is null so it should end up in state 4 not 5.

I'm getting the information from a hash table.
Title: Re: How do I set a Gameobject variable to nothing?[SOLVED]
Post by: jeanfabre on January 10, 2014, 08:18:49 AM
Hi,

 can you try this action instead?

http://hutonggames.com/playmakerforum/index.php?topic=5653.msg27225#msg27225

Bye,

 Jean