playMaker

Author Topic: Activate GameObject Child  (Read 5056 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Activate GameObject Child
« on: June 22, 2015, 10:25:31 PM »
request from : http://hutonggames.com/playmakerforum/index.php?topic=10582.0

Activate/deactivate child(s) of gameobject (does nothing to parent gameobject) with child(s) exceptions

 :)
« Last Edit: June 22, 2015, 10:29:48 PM by dudebxl »

foxdeltagames

  • Junior Playmaker
  • **
  • Posts: 62
Re: Activate GameObject Child
« Reply #1 on: June 23, 2015, 01:29:18 AM »
Thanks. Will come in handy :)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: Activate GameObject Child
« Reply #2 on: June 23, 2015, 07:49:01 AM »
Very, Very Awesome!!

Not sure why you left 'Activate' on as default, IMO it should be the other way around.

Anyway, for the next reader, here's how to use this fantastic tool by dudebxl:

TESTRUN:

Make an empty Gameobject (Mother)
Make like 10 empty game objects as children (with individual names)

Now, in 'Mother' all you need to do, is to make an FSM with this "Activate Game Object Child" action, and then..

Either by the use of a (global) variable, or as a test do it directly: Chose how many children, and which should 'stay alive'.

(make sure you uncheck 'Activate' for this test)

Now, when you play, only the chosen children will be active.

Stop a while, and think about the options this gives you!

Next thing could be to use this with something like a Hash table (for the input of what should be active).

How ever you use it, it can be an extremely strong tool for .. maybe your player has certain weapons on certain levels.. maybe you want to play a certain list of soundtracks based on .. endless options, strong magic!

Basically it's like a Hash table, only the input is a GameObject, and the output is one or more Game objects (that might have children, could be entire game levels) - and it's set up in Zero time, and is very easy to read.. a folder and a variable of what to be activated inside this folder (GameObject)

Thank you dudebxl :)

p4ppy2004

  • Guest
Re: Activate GameObject Child
« Reply #3 on: December 15, 2015, 07:57:22 PM »
This action doesnt work anymore. Can someone update it please. Using unity 5.3 and playmaker 1.8 beta

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Activate GameObject Child
« Reply #4 on: December 16, 2015, 06:54:39 PM »
what do you mean? What errors are you getting?

beowulfkaine

  • Playmaker Newbie
  • *
  • Posts: 47
Re: Activate GameObject Child
« Reply #5 on: March 09, 2021, 08:04:10 PM »
Thanks this really helped me.