Forum rules - please read before posting.

Best way to Kill/Interrupt an Asset Action List

Hi all. Sorry to spam again, but I've not been able to find a post that reflects this specific use case.

Context:
I'd like to know the best way to completely stop an asset ActionList. I've tried using Kill and Pause, but they don't seem to work (I'm sure I'm just not using them correctly). For full context, I'd like a trigger to stop a combine interaction ActionList when the character enters the trigger, or the opposite, a Hotspot Inventory Interaction to be stopped by an On Enter/Continous Trigger.

This has to do specifically with NPCs and interactions, and how they sometimes run or interrupt each other in awkward ways. For example, if the player is in the middle of an animation and an NPC OnEnter trigger interrupts that—what's the best way to handle it? Should I create a separate ActionList that runs beforehand and cancels the custom animation, or should I kill the ActionList directly?

As usual, thank you in advance for any help.

Have a wonderful rest of the weekend.

Comments

  • Using the ActionList: Kill Action should be fine - but it's important to know that ending a list won't necessarily end its effects. If a character is mid-movement or mid-animation, for example, they won't stop this behaviour as a result - only won't be given any more commands.

    Currently, you would need to separately stop their animation with another e.g. Character: Animate Action to manually end the animation.

    Unless I'm misunderstanding your situation. If so, I think more concrete context is needed - could you provide screenshots that show a full example, i.e. the original ActionList, and what "kills" it?

  • Hi Chris,

    Thanks as always for your quick replies. Yes, that’s exactly the context I meant. I was trying to use Kill to stop animations and sounds that were running in that ActionList, so I assumed the Kill function wasn’t working.

    It sounds like I need to create a separate ActionList that runs beforehand to stop sounds, cancel animations, and end dialogue.

    Could you please tell me the best use cases for Kill and Pause? When is it ideal to use each?

    As always, thank you!

  • edited June 24

    Kill and Pause will both just stop an ActionList's code from running any further. Though, with Pause, you have the option for any currently-running Actions to complete before doing so.

    These commands are probably best used with background ActionLists. A couple of examples:

    1. A bomb in the scene is going to go off in 10 seconds. A background ActionList handles the countdown delay, and then blows up at the end. If the Player solves the puzzle in time, the ActionList gets killed as the bomb gets defused.
    2. An NPC is moving around the scene with a background ActionList that moves him around the scene, waiting and perhaps playing animations occasionally. When the Player talks to him, this ActionList gets paused for the duration of the Conversation, and then resumed again afterwards so that he can continue his activities without restarting.
  • Thank you, Chris. That helps out a lot. Almost done with the new NPC stuff and I'll try to use what I've learned here to make a bit more complex behavior.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.