Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Bhaz on July 17, 2019, 12:24:21 PM

Title: OnDestroy FSM
Post by: Bhaz on July 17, 2019, 12:24:21 PM
I'm new to FSM's and I am curious if it's possible (unless something else like it exists already) to have an FSM that: once an object is destroyed you can then (transition into) load a scene or have another action possible?

I've been trying to find a way that when my enemy character is destroyed/killed, a new scene will load up in unity.
Title: Re: OnDestroy FSM
Post by: Thore on July 17, 2019, 12:40:11 PM
Generally, you would design it such that other objects tell the player that it is now considered destroyed, and it then takes it from there, plays death animation, particles, sounds, and so on. Then, you can fire off a global event, your OnDestroy for instance, that triggers the next scene. After it executed everything, only then the player destroys itself.

Maybe there’s also an action that is fired on destroy, or maybe an event on exit action works, too.
Title: Re: OnDestroy FSM
Post by: djaydino on July 17, 2019, 04:14:40 PM

This video might help to understand global events :