playMaker

Author Topic: Want to destroy object when it's not visible, but not working properly.  (Read 3670 times)

sturmburg

  • Playmaker Newbie
  • *
  • Posts: 12
Hi,

So I spawn a projectile and want to destroy it when it's no longer visible.  On the projectile itself I've got an FSM with a start state containing my Translate action.  When I test this it works fine.  The projectile is spawned properly and moves. 

In the same FSM I also have a global transition to a state that contains a Destroy Self action.  The problem is when I plug this global transition into the Game Object is Visible action (under false event) in the start state, the projectile no longer spawns (or it's being spawned and destroyed instantaneously).

Any ideas?

Thanks

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
What is the destroy condition? ie if the projectile hits an object it then moves into another state, that state will destroy it.

sturmburg

  • Playmaker Newbie
  • *
  • Posts: 12
The only destroy condition I am trying to use right now is 'Game Object Is Visible' (which lives on the Start state of the projectile).  When I plug in the name of the global transition in the 'False Event' that has the Destroy Self action in it, it doesn't work.

It was my understanding that the false event in Game Object is Visible should only be called when the object is not visible by any camera.

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Gave it a test and you are correct ... very weird.

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Yep, this is happening to me too. I can't seem to destroy projectiles using Game Object is Visible = False = Destroy Self. As soon as you turn Game Object is Visible on - the projectiles will not spawn.

EDIT: Just did a little testing, seems the FALSE statement on Game Object is Visible is broken.
« Last Edit: May 06, 2013, 02:02:50 PM by dlmrky »