playMaker

Author Topic: All Destroy actions are instantly validated  (Read 1037 times)

MlleBun

  • Playmaker Newbie
  • *
  • Posts: 28
All Destroy actions are instantly validated
« on: July 03, 2020, 08:05:37 AM »
Hi everyone! I'm just starting with Playmaker so, sorry if this question has already been asked. I would like to Destroy a gameobject on TriggerExit.

When I send a FINISHED event on TriggerExit to a state that deactivate the gameobject, the behaviour is ok. The gameobject deactivate at FINISHED.
But if I bring this transition to a State with a Destroy action (or Destroy Object), the gameobject is destroyed instantly (on TriggerEnter).

Can someone help me figuring this out? Thanks
« Last Edit: July 03, 2020, 08:08:26 AM by MlleBun »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: All Destroy actions are instantly validated
« Reply #1 on: July 03, 2020, 05:33:47 PM »
Hi.
On trigger event you should not use 'Finished'
Set a different transition event.

If that does not help set the trigger Exit in a separate state after you did 'Activate Game Object'

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: All Destroy actions are instantly validated
« Reply #2 on: July 06, 2020, 01:46:00 AM »
Hi,

 Like djaydino said, don't use FINISHED event manually, this is a special event that is used internally by playmaker called when all actions within a state are done.

Bye,

 Jean

MlleBun

  • Playmaker Newbie
  • *
  • Posts: 28
Re: All Destroy actions are instantly validated
« Reply #3 on: July 06, 2020, 07:37:41 AM »
Thanks for your response. I tried a System Event TRIGGER ENTER or TRIGGER EXIT and also a custom event but those two methods do not seem to work. What am I missing ? Could you post a screen on a onTriggerEnter state transitioning to a DestroySelf ? Many thanks again
« Last Edit: July 06, 2020, 07:39:26 AM by MlleBun »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: All Destroy actions are instantly validated
« Reply #4 on: July 06, 2020, 08:28:09 AM »
Hi.
Try adding a state between the destroy and trigger event and add a 'Next Frame Event'

Have you tried setting the 'Activate Gameobject in a separate state?

For the event, use your own made event (for example 'isTriggered')