playMaker

Author Topic: [SOLVED] How do I Spawn random objects?  (Read 2176 times)

Cyborg_Sam

  • Playmaker Newbie
  • *
  • Posts: 11
[SOLVED] How do I Spawn random objects?
« on: September 21, 2015, 06:27:45 PM »
Hello,


I am trying to figure out the best way to spawn random objects from the same spawn point.
e.g a cannon that shoots out apples,oranges & limes.

I have the movement of the objects working, but as i am new to playmaker and Unity, i am not sure where to start.

Thank you for your help   
« Last Edit: September 22, 2015, 05:52:43 AM by Cyborg_Sam »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: How do I Spawn random objects?
« Reply #1 on: September 21, 2015, 06:55:49 PM »
You could have your spawner spawn/create a game object variable- before it spawns/creates it you could use "select random game object" to select a random game object var from a list of objects and store it in your game object variable that gets spawned-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Cyborg_Sam

  • Playmaker Newbie
  • *
  • Posts: 11
[SOLVED] How do I Spawn random objects?
« Reply #2 on: September 22, 2015, 05:52:07 AM »
Thank you @mdotstrange!!! Worked perfectly!

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: [SOLVED] How do I Spawn random objects?
« Reply #3 on: September 22, 2015, 07:33:55 AM »
Glad it worked for you  :)
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!