I was working on a new unit for my map called speedy which has a buff called mercspeedybuff this buff will let any unit within range walk faster. So my idea was to have a cool visual like the guardian shield the sentry uses to see if units are in range but for that i would have to make the guardian shield animation to run permanent and after a lot of searching i found out that you need a 3d editing program to extend the animation of the guardianshield model .
So what i did:
- I created a behavior called mercspeedybuff for my unit speedy which will increase any units walking speed when in range.
- I create an actor called speedybuffvisuals which will create the model guardianshield whenever the behavior mercspeedybuff is created.
- The model animation of guardianshield lasts approx 33 secs so i set my mecrspeedybuff behavior duration to 33 seconds.
- i make an effect called applymercspeedybuff which applies the mercspeedybuff.
- I set to my mercspeedybuff behavior Effect final: applymercspeedybuff so that it will reapply the behavior once the duration is over.
So i thought what i did would make the behavior run for 33 seconds, then "Effect final: applymercspeedybuff" takes place so that the behavior gets reapplied, and because the behavior gets reapplied the visual would trigger again.
The problem is that the animation plays only the first time when the buff is on, what i would expect is that when the " Effect final: applymercspeedybuff " takes place it would also restart the animation of the guardian shield, but apparently it only rescreates the behavior on the unit and not the visiuals, while i have stated that the visiuals should play everytime the behavior is applied(created).
conclusion: a lot of wasted time....
I think that there are a lot of simpler ways to do this, but i wasnt feeling like searching the internet and just started trying stuff, so now i hope someone can make things work for me :]
To repeat an animation, I would use the following set of actor events. There might be other methods, but I found this one to be the best and most reliable for my applications:
Behavior.X.on
Create
Behavior.X.off
Destroy
ActorCreation
AnimPlay "Lifetime" Stand PlayForever
Actor Creation
TimerSet "RepeatTimer" 0
Timer Expired
->TimerName "RepeatTimer
TimerSet "RepeatTimer" 33
Timer Expired
->TimerName "RepeatTimer
AnimSetCompletion "Lifetime" 0
Done from memory, so there might be slight errors.
What it does is starting the animation together with a timer. Whenever the timer is expired, it restarts the timer and resets the animation to start from the beginning. Adjust the timer to match the animation.
If you don't need any more timers in this actor, you can skip the TimerName handling. Also, you can set both timers to the specific time, but it doesn't matter, if the initial timer is 0, like shown here.
No, my method was pretty much the same. I toyed around with Guardian Shield a while back and I knew what was required to get it to show up "permanently"
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys,
I was working on a new unit for my map called speedy which has a buff called mercspeedybuff this buff will let any unit within range walk faster. So my idea was to have a cool visual like the guardian shield the sentry uses to see if units are in range but for that i would have to make the guardian shield animation to run permanent and after a lot of searching i found out that you need a 3d editing program to extend the animation of the guardianshield model .
So what i did:
- I created a behavior called mercspeedybuff for my unit speedy which will increase any units walking speed when in range.
- I create an actor called speedybuffvisuals which will create the model guardianshield whenever the behavior mercspeedybuff is created.
- The model animation of guardianshield lasts approx 33 secs so i set my mecrspeedybuff behavior duration to 33 seconds.
- i make an effect called applymercspeedybuff which applies the mercspeedybuff.
- I set to my mercspeedybuff behavior Effect final: applymercspeedybuff so that it will reapply the behavior once the duration is over.
So i thought what i did would make the behavior run for 33 seconds, then "Effect final: applymercspeedybuff" takes place so that the behavior gets reapplied, and because the behavior gets reapplied the visual would trigger again.
The problem is that the animation plays only the first time when the buff is on, what i would expect is that when the " Effect final: applymercspeedybuff " takes place it would also restart the animation of the guardian shield, but apparently it only rescreates the behavior on the unit and not the visiuals, while i have stated that the visiuals should play everytime the behavior is applied(created).
conclusion: a lot of wasted time....
I think that there are a lot of simpler ways to do this, but i wasnt feeling like searching the internet and just started trying stuff, so now i hope someone can make things work for me :]
To repeat an animation, I would use the following set of actor events. There might be other methods, but I found this one to be the best and most reliable for my applications:
Done from memory, so there might be slight errors.
What it does is starting the animation together with a timer. Whenever the timer is expired, it restarts the timer and resets the animation to start from the beginning. Adjust the timer to match the animation.
If you don't need any more timers in this actor, you can skip the TimerName handling. Also, you can set both timers to the specific time, but it doesn't matter, if the initial timer is 0, like shown here.
.... all my post written up for nothing... :(
I wonder, would your method be different?
@Kueken531: Go
Man it worked on first try, thank you your king!
@BorgDragon: Go
Lol, well sometimes it can be a pain to find the right tutorial... :p
anyways, since this worked pretty easy for me, is there a way to make it not play the birth animation when it repeats?
dont set the completion to 0% but something like 20%, adjust the timer accordingly.
@Kueken531: Go
No, my method was pretty much the same. I toyed around with Guardian Shield a while back and I knew what was required to get it to show up "permanently"