playMaker

Author Topic: Get Random Object not working with inactive objects? [SOLVED]  (Read 1477 times)

nhe1

  • Playmaker Newbie
  • *
  • Posts: 10
I have a manager that selects random objects with a specific tag. However it is not returning anything. This objects are tagged as "enemy" and are inactive when i start the game. I wanted to select from the random set of enemies that are inactive and set them to active. Any workaround on this?
« Last Edit: May 11, 2018, 05:04:20 PM by nhe1 »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Get Random Object not working with inactive objects?
« Reply #1 on: May 11, 2018, 04:50:00 PM »
You can't find an inactive object. I had a similar issue, i resolved it by adding an active parent object (child is inactive) with transform only with the appropriate tag.
Available for Playmaker work

nhe1

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Get Random Object not working with inactive objects?
« Reply #2 on: May 11, 2018, 05:03:50 PM »
thanks this worked! I parented it on an active object  ;)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Get Random Object not working with inactive objects? [SOLVED]
« Reply #3 on: May 12, 2018, 04:45:59 AM »
Glad it works out for you :)
Available for Playmaker work