playMaker

Author Topic: Destroying an object that enters a Trigger? [Solved]  (Read 1709 times)

Midgetcorrupter

  • Playmaker Newbie
  • *
  • Posts: 4
Destroying an object that enters a Trigger? [Solved]
« on: July 21, 2014, 10:36:03 AM »
Hi Playmaker forums

I have been using Playmaker for a few weeks now and thought I was starting to get the hang of it. However today I have run up against a brick wall! I have managed to solve problems before thanks to reading threads on here but just couldn't find one for this problem.

I have boxes which are prefabs that are spawned via an FSM every few seconds. These boxes then move through the level via physics (Basically falling down a tube). What I want is for them to be destroyed when they hit a trigger at the end of the tube.

What is the best way to set something like this up?

Thank you in advance

Rick
« Last Edit: July 21, 2014, 11:19:47 AM by Midgetcorrupter »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 715
    • Flashing Lights
Re: Destroying an object that enters a Trigger?
« Reply #1 on: July 21, 2014, 11:12:53 AM »
Hello,

for example.
Make a gameobject with a collider with isTrigger checked at the bottom of the tube, set a Tag "destroyer".
In prefab make fsm with Trigger event action, set tag "destroyer",
when true, goes to another state with Destroy self action.

Something like this:)

Midgetcorrupter

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Destroying an object that enters a Trigger?
« Reply #2 on: July 21, 2014, 11:18:30 AM »
Thank you 600.

That worked perfectly  :)