playMaker

Author Topic: activate game obj. by tag  (Read 3152 times)

mikejkelley

  • Full Member
  • ***
  • Posts: 136
activate game obj. by tag
« on: December 03, 2013, 04:44:01 AM »
I think this would be useful.  :)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: activate game obj. by tag
« Reply #1 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?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: activate game obj. by tag
« Reply #2 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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: activate game obj. by tag
« Reply #3 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

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: activate game obj. by tag
« Reply #4 on: January 14, 2014, 03:53:33 PM »
Jean, I always want to go crazy so I'll probably try it that way, thanks!