playMaker

Author Topic: How do I activate a random child object?  (Read 2693 times)

Scumbag95

  • Playmaker Newbie
  • *
  • Posts: 3
How do I activate a random child object?
« on: December 07, 2017, 04:46:08 PM »
Hey,

How do I make a child game object activate on level load?

- THANKS 8)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How do I activate a random child object?
« Reply #1 on: December 07, 2017, 05:05:27 PM »
Hi.
You could place your objects into an array and then use 'Array Get Random'
Store the variable and then use 'Create Object' on the "GameObject" set the variable you got from the 'Array Get Random'

Scumbag95

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I activate a random child object?
« Reply #2 on: December 07, 2017, 05:12:35 PM »
No no, I want a gameobject to activate, not spawn. Here is what I have tried to do so far.

IGNORE THE ERROR, it was because I deleted a state.

I want to spawn a child object, from a gameobject that has my character's in it.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How do I activate a random child object?
« Reply #3 on: December 07, 2017, 06:27:31 PM »
Hi,
On the action 'Activate Game Object',
set "game object" to the 'SPCHANGE' variable.

Scumbag95

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I activate a random child object?
« Reply #4 on: December 08, 2017, 12:24:51 PM »
Hi,
On the action 'Activate Game Object',
set "game object" to the 'SPCHANGE' variable.

Thanks buddy, this is exactly what I wanted, works perfect!