Download

How to define an actors current state in actor blueprint

I have been working on a directional turret for my RTS game that attacks on a fixed directional plane, Forwards, backwards, Left, right

I currently have it set so that when actor enters turret range collision overlap it snap facing to that direction…

What I would like now do is have it that ion entering collision set turrets current state to be say State facing forward so that in animation blue print I can call that state and have it play the animation that goes along with the change direction between different facings… or also have it so if facing forwards and enemy enters into the collision overlap on left it will play animation move from face forwards transition to left aiming direction.

how can I setup it up to set default states that can be activated when one of the overlap events get triggered?

https://youtube.com/watch?v=JluXoBkBzh4

small update trying to setup the cannon actor and adjusted created boolean called face front then in the blueprint editor graph I cast to the actor and get it and set face front variable but on connecting it up in the animation graph even when my actor walks through the trigger detection its not playing the animation from the event graph

ok I found fix to one issue I was having, the animation in the anim blueprint was set to loop, I untoggled that now the animation plays just once…

There is one more issue I am trying to debug, currently when my actor enters the overlap it plays the animation from blue print once but re-entering the overlap it does the overlap print message but will not replay the animation connected again. How can I set it up to allow overlap to reset and allow replay if 1. another overlap at different position has been triggered and then the forwards position gets triggered again?

Also what would be the correct way to store the current active state to say Forwards> then if player activates right hand trigger box overlaps it knows to play animation transition from forwards, raise barrel up, rotated to right then lower barrel to Faceright state.

Trying something else using this setup but having weird bug, after the second trigger it plays the fire animation but then it then does a raise lower anim which is not called anywhere not in anime blueprint or in the cannon blueprint…