Update: Summoning Rat Animation

Hero_summon_ratV2I have create an animation for when the rat is being summoned. Before the player would just stand in it’s idle state, but now this will play instead. Once finished the animation is frozen.

To apply this animation I first needed to alter the summoning conditions, so it will call for the above animation to be played:


Above I split the code into two sections. The top code will set up the animation so it can be played and the bottom code reset the summoning animation, so the player looks like it is waiting to pick up the rat. The summoning animation code looks like this:


Only the top section of code has been used so far. The other two were final improvements, they weren’t necessary, but improved the animation a lot more.

Here is what it looks like with the code implemented:
SummoningRat_ ingame

Now for the extra code shown. The extra code is for ending the animation sequence. To initiate the code, I altered the on collision with rat action in the player code:
Rat_return_code_V2This simply just deletes the rat and changes a variable. The other code is currently useless, because I haven’t set up any scenarios for it just yet.

Anyway this brings me back to the code previously. With the new animation_action value. The animation is then looked for and once found, will start reversing the animation. After the animation hits a certain frame range, the animation will be set to the idle pose and the animation_action will be unlocked for the other animation code, so it can be reused.



One thought on “Update: Summoning Rat Animation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s