You could set a timer. Or check the flag 'Play Forever' on the Animation Play.
Just so you know, AnimationStyleOneShot and AnimationStyleContinuous don't actually mean the thing can only be played once or whatnot, it's just a few default changes within the actor fields that are better suited to the style.
Like SoundOneShot actors and SoundContinuous(or whatever) have just the priority field slightly adjusted.
If your using animation brackets, the Play Forever flag plays the CONTENT animation forever, not the opening. Modify your animation bracket and set its content to what you want.
whenever an animation is played for this actor, start a Timer, which expires in 0.6 seconds
TimerExpired
AnimPlay "Lifetime" Stand
whenever a Timer expires for this actor, play the animation (starts the animation from the beginning)
AnimPlay
AnimationSetCompletion "Lifetime" 0
whenever an animation is played, set the completion of the "Lifetime" animation to 0%. This can be used to alter the start point of the animation. this is not required, just a possibility to change the visuals; try setting it to 20
Note that there is no destroy yet, so the actor ever gets removed. You might want to add that yourself (in my case, something like UnitDeath -> destroy would be appropiate, but you will probably use it in another way).
well in my map i have my host selected to my unit?
Yes, thats another way of setting it.
You can pick a specific actor, like you or you can select an alias, like me.
_Selectable means that all actors with the _Selectable alias can be the host of this actor. This includes all standard unit actors, missiles and some other stuff. For the UnitBirth event, the host will always be the actor of the unit created; assuming it has the _Selectable alias. For other events, this might not work.
This is very helpful, if you, for example, create an actor attachment for a buff spell, which can be targeted on any unit.
There are even more ways to get a host, like setting a global reference or trying to get specific units from the effect chain (like the caster unit); however not all of them always work.
how can you loop one shot animations because i want then animation to loop but it only plays on unit birth
@aczchef: Go
You could set a timer. Or check the flag 'Play Forever' on the Animation Play.
Just so you know, AnimationStyleOneShot and AnimationStyleContinuous don't actually mean the thing can only be played once or whatnot, it's just a few default changes within the actor fields that are better suited to the style.
Like SoundOneShot actors and SoundContinuous(or whatever) have just the priority field slightly adjusted.
yeah i know but this animation isnt a looping animation the would loop normaly
borg play forever didnt work
If your using animation brackets, the Play Forever flag plays the CONTENT animation forever, not the opening. Modify your animation bracket and set its content to what you want.
Also, what model/animation are we talking about?
Rejuvenate Energy Impact
Campaghin
If everything else fails, you can do something like:
i already tried kueken seems like the only thing i can do is play the animation or not play it nothing else cant even set the time to start
What about this?
Does never get destroyed right now, you might want to add an event for that ;)
i see it working i dont understand whats happening in the actors brief description please so i can use for future reference
Okay.
I have set the following events:
should be obvious
just like this
whenever an animation is played for this actor, start a Timer, which expires in 0.6 seconds
whenever a Timer expires for this actor, play the animation (starts the animation from the beginning)
whenever an animation is played, set the completion of the "Lifetime" animation to 0%.
This can be used to alter the start point of the animation.
this is not required, just a possibility to change the visuals; try setting it to 20
Note that there is no destroy yet, so the actor ever gets removed. You might want to add that yourself (in my case, something like UnitDeath -> destroy would be appropiate, but you will probably use it in another way).
ok thx kueken i didn't know where the looping was happening i set the time to 1.23 (so its a lil closer to the whole model)
PS:I noticed it was attached with no host how? never seen it like that
Not sure what you mean? The host is set to _Selectable. Without a host, it would not work.
well in my map i have my host selected to my unit?
Yes, thats another way of setting it.
You can pick a specific actor, like you or you can select an alias, like me.
_Selectable means that all actors with the _Selectable alias can be the host of this actor. This includes all standard unit actors, missiles and some other stuff. For the UnitBirth event, the host will always be the actor of the unit created; assuming it has the _Selectable alias. For other events, this might not work.
This is very helpful, if you, for example, create an actor attachment for a buff spell, which can be targeted on any unit.
There are even more ways to get a host, like setting a global reference or trying to get specific units from the effect chain (like the caster unit); however not all of them always work.
thx!!