Forum rules - please read before posting.

ActionList with params: how to play an animation on player by param change

My 2D Point&Click game uses several playable characters (so multiple players) and I want to create ActionList with parameters for different actions.

One of this actions is pretty close to the example in the manual the 5.13 section: the Player picks up an item. I've tried to do it with an Action List. Problem is when I want to play the pick up object animation on Player. To play the animation, I want to use the Character: animate action, using 'Change Parameter Value' as Method. This way I can configure the Players animation in the Animator and just trigger the pick up animation changing the parameter.

But if I mark 'Is Player?' option in the Action, the 'Change Parameter Value' Method is no longer available. 

I suppose is because if the Action knows the player in compiling time it can offer the available Animator parameters, but if the Players is unkown it can't.

Is there any workaround to do this? I mean to have a generic Action List capable of changing Animator parameter values for current Player.

The workaround is to trigger the Animation in the Action List with Play Custom and use the animation name (with the directional suffix). It should work, but the pick up animation will not be managed by the Animator.


Thanks for any help, it will be greatly appreciated.




Comments

  • Welcome to the community, @rsa.

    As the Character: Animate Action will vary in appearance based on the affected character's chosen "Animation engine" setting, it needs to have a character assigned before its options will show.

    When you click Is Player?, it will use the settings provided by the default Player prefab assigned in your Settings Manager.  If your various Player prefabs rely on different animation engines, and they can all run this ActionList, then you will have to create separate such Actions for each animation engine type (using the Player: Check Action to make sure the right Players get the right Character: Animate), and assign the Player prefab manually into the Character field, as opposed to checking Is Player? to have it assigned automatically.

    It will be easier, though, to have all your Players share the same animation engine.  Which ones are they currently using?
  • Thanks for the Welcome :)

    Perfect! I had something wrong with my prefab player (I think I created the prefab, then change the animation engine but I didn't update the prefab). I've made sure my prefab uses the same engine as my current player. Now my generic Action List seems to work ok.

    Thanks!

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.