playMaker

Author Topic: setting up random turrets....  (Read 1702 times)

Puzzlebox

  • Playmaker Newbie
  • *
  • Posts: 5
setting up random turrets....
« on: February 17, 2013, 11:24:48 PM »
I'm trying to make spaceships that spawn then randomly spawns a turret from a list of prefab turrets. I would like the turrets to become a child of the spaceship or follow that spawnpoint. How would i set this up in Playmaker?

Puzzlebox

  • Playmaker Newbie
  • *
  • Posts: 5
Re: setting up random turrets....
« Reply #1 on: February 21, 2013, 05:57:25 PM »
Ok, I figured it out. What I have to do is use the action "Find Closest" and "Set Parent" and put these actions on the turret. Then have the action "Find Closest" to make a gameobject variable for the action "Set Parent." Soon as the turret spawns it searches for the nearest object with the tag "Hardpoint." Which I'll put onto the spawnpoint it self. Then all you have to do is create an FSM on the spawn point which creates a random object, AKA the selection of prefab turrets. Bingo-bango, There ya go! Random spawning turrets!