Forum rules - please read before posting.

Run action lists at specific points in an animation

Good morning guys,
I have a little doubt that has been nagging at me for several days, initially I thought that to implement it you had to go via script, but then thinking about it, I said to myself, maybe with Adventure Creator I have the possibility to do it.
So: I wanted to know if there is a possibility to start an action list at a certain point in an animation.

I'll give an example:
I create an animation of a character who has a gun and shoots, and I would like that at the point in the animation where the gun fires,(so at a certain keyframe), add an instruction where I say, now launch the action list(this action list will contain the instructions to execute the particles, the sound effect of the shot, and other devilry that makes the animation more real).

Something similar to the footsteps we're going to check off to create the walk sound effect.

I noticed that through Unity's Animation window, I can see all the keyframes of the character's animation, and just wondered if it would be possible from there to go in and enter the command to launch the desired Action list.

Thanks

Comments

  • You can use's Unity Animation Events feature to run custom functions at certain points in an animation - see the docs for it here.

    You can't pass an ActionList as a parameter directly, but you can pass it as a Unity Object and use a conversion function to convert and then run it:

    public void RunActionList (Object actionListOb)
    {
        AC.ActionListAsset actionList = (AC.ActionListAsset) actionListOb;
        actionList.Interact ();
    }
    
  • Thank you Chris, I will try the solution you suggest.

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.