Forum rules - please read before posting.

Player Animation when key press

edited February 2021 in Technical Q&A

Hello all,

For the needs of my game I created a script that allows me to activate a 6th sense that allows me to see NPCs and objects. This 6th sense is activated when I press a key on the keyboard (for example "b").

I would like that when I press this key my character performs a small animation before the 6th sense is activated.
In the animator I created a "power" animation.

Screen from my player animator : https://zupimages.net/viewer.php?id=21/07/i96m.png

And I would like to know where I should call it, in my Scirpt directly or by conditioning it to a variable?

Thanks for the help

Comments

  • You can do this with Active Inputs.

    Active Inputs are a way of running ActionLists when a particular input is pressed.

    If you define an input named e.g. "6th Sense" in your Input Manager, and map it to the "b" key, you can then create an Active Input for it that runs an ActionList that uses e.g. the "Object: Animate" Action.

    For details, see the Manual's "Active inputs" chapter.

  • Indeed it works very well! Thanks for the help

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.