Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: mikejkelley on December 03, 2013, 04:44:01 AM

Title: activate game obj. by tag
Post by: mikejkelley on December 03, 2013, 04:44:01 AM
I think this would be useful.  :)
Title: Re: activate game obj. by tag
Post by: Lane on December 03, 2013, 07:32:38 AM
Whats your use case? Are you trying to activate a bunch of objects with a specific tag or activate an object only if it has a specific tag?
Title: Re: activate game obj. by tag
Post by: mikejkelley on December 13, 2013, 04:17:19 PM
Hi, I'm trying to deactivate all weapons when a character selects a new weapon. I suppose I could child them all to an empty game object and then deactivate that?
Title: Re: activate game obj. by tag
Post by: jeanfabre on December 14, 2013, 01:14:09 PM
Hi,

 not really nice. I would implement a global event system that you would broadcast to all.

 you would first fire a "DISABLE WEAPON", and then enable the one the user selected. that will be easier.

 if you want to go crazy :) actually create a global event "SELECT WEAPON", and pass the weapon reference with that event, then ALL weapons responds to it, and double check that the passed references matches or not, and they disable themselves if not matching, else it's the selected one and it can proceed and do what ever it needs to become the selected weapon.

bye,

 Jean
Title: Re: activate game obj. by tag
Post by: mikejkelley on January 14, 2014, 03:53:33 PM
Jean, I always want to go crazy so I'll probably try it that way, thanks!