I'm messing around with a third person styled game using WSAD for movement and left clicking to use melee attacks.
Basically all I did was make an ability that causes the damage effect at the targeted point. Then I made a trigger that causes your unit to cast the ability when you left click.
Right now, the spell works perfectly whether you use the trigger to cast it or if you just cast it manually through the unit (with the left click trigger turned off). The problem is my unit isnt executing his attack animation when I use the ability.
I added the following event to my unit's actor (the actor uses the Protoss Preserver model):
Abil.Attack.SourceCastStart
AnimPlay Attack Attack
I also tried:
Abil.Attack.TargetCastStart
AnimPlay Attack Attack
The name of the ability is simply Attack.
But for one reason or another, he will not play his attack animation. Any idea?
That's fine and all, but if you name it ATTACK, and then add a PREFIX/SUFFIX, the Prefix/Suffix won't show up when you select your ability through the actor dropdown... just the short, default name. If you add the prefix in the base name of the ability, it would show up as Abil.SaviorAbilityAttack.SourceCastStart.
If you did call it Attack and added the prefix/suffix afterwards, try changing it to Abil.Attack2.Sourcecaststart
I already tried SourceCastStart and SourceCastEnd. Neither produced an animation:(
By the way, I appreciate the help. Keep making suggestions cuz I'm dying to figure this out..
EDIT: Just to test that the Attack animation for this unit exists, I added a trigger action that tells the unit to do the Attack animation when the mouse was clicked. This worked, however he will do the attack even if the ability hasnt finished cooling down, which is not good. Plus, I would like to understand Actor events more since that make using ability animations more streamlined.
We don't have all the information to know what's going on, but here's my two cents.
If your ability is transient or without any casting/channeling/finish time, it will be done instantly and the unit will immediately start doing something else. So even if you tell it to play animation X, it might attack the next tick and then switch to playing the attack animation. Catching the abil.foo.SourceCastStart event is all good, but try making the casting or finish time non-zero.
We don't have all the information to know what's going on, but here's my two cents.
If your ability is transient or without any casting/channeling/finish time, it will be done instantly and the unit will immediately start doing something else. So even if you tell it to play animation X, it might attack the next tick and then switch to playing the attack animation. Catching the abil.foo.SourceCastStart event is all good, but try making the casting or finish time non-zero.
Nah, none of these worked. I made sure that the ability had the attack priorities and event markers: Cast Prepare and Finish. I then set the cast time to 3 seconds, which would be plenty of time. That didnt work. Then I tried making the finish 3 seconds and that didnt work either.
Something is wrong here. Would it help if I posted the map or something?
Also: The unit doesnt have any other orders that would really override the animation. He can't be ordered to move or attack normally. I removed both of those. Right now, the only ability he has is the Attack (Savior - Ability) ability that I gave him.
I was supposed to make the "Name" field: Cast
I thought you could name it whatever you wanted. I then made the the time type Duration and time variant -1
I was supposed to make the "Name" field: Cast I thought you could name it whatever you wanted. I then made the the time type Duration and time variant -1
What other names can go into the Name field ?
its basically anything. its a label you can later refer to, to get the animation. for example the actor action Animation Clear has a name label field in it; you will have to put that 'name' of your animation in there to get it cleared.
:)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm messing around with a third person styled game using WSAD for movement and left clicking to use melee attacks.
Basically all I did was make an ability that causes the damage effect at the targeted point. Then I made a trigger that causes your unit to cast the ability when you left click.
Right now, the spell works perfectly whether you use the trigger to cast it or if you just cast it manually through the unit (with the left click trigger turned off). The problem is my unit isnt executing his attack animation when I use the ability.
I added the following event to my unit's actor (the actor uses the Protoss Preserver model): Abil.Attack.SourceCastStart AnimPlay Attack Attack
I also tried: Abil.Attack.TargetCastStart AnimPlay Attack Attack
The name of the ability is simply Attack.
But for one reason or another, he will not play his attack animation. Any idea?
@watterboy1: Go
Make sure you are selecting the correct Attack ability... last I remember there's the generic Attack, and then you went and named yours Attack...
@BorgDragon: Go
I added a editor prefix to it as well, to set it apart: Attack (Savior - Ability)
@watterboy1: Go
That's fine and all, but if you name it ATTACK, and then add a PREFIX/SUFFIX, the Prefix/Suffix won't show up when you select your ability through the actor dropdown... just the short, default name. If you add the prefix in the base name of the ability, it would show up as Abil.SaviorAbilityAttack.SourceCastStart.
If you did call it Attack and added the prefix/suffix afterwards, try changing it to Abil.Attack2.Sourcecaststart
@BorgDragon: Go But it did show up on the list with the suffix. And I already tried SourceCastStart as well as the Target one shown below. http://imageshack.us/photo/my-images/535/picexample.png/
@watterboy1: Go
Maybe it's something knew, maybe it was always there... either way... that picture tells it all...
Shouldn't that be SourceCastStart ?
@BorgDragon: Go
I already tried SourceCastStart and SourceCastEnd. Neither produced an animation:(
By the way, I appreciate the help. Keep making suggestions cuz I'm dying to figure this out..
EDIT: Just to test that the Attack animation for this unit exists, I added a trigger action that tells the unit to do the Attack animation when the mouse was clicked. This worked, however he will do the attack even if the ability hasnt finished cooling down, which is not good. Plus, I would like to understand Actor events more since that make using ability animations more streamlined.
Well, you know you could add a condition to check if the cooldown for the ability is done or not.
Put this in an if then else statement, thus you have the animation only playing when the cooldown is not there.
As for the data method... the ability is not transient is it?
We don't have all the information to know what's going on, but here's my two cents.
If your ability is transient or without any casting/channeling/finish time, it will be done instantly and the unit will immediately start doing something else. So even if you tell it to play animation X, it might attack the next tick and then switch to playing the attack animation. Catching the abil.foo.SourceCastStart event is all good, but try making the casting or finish time non-zero.
Nah, none of these worked. I made sure that the ability had the attack priorities and event markers: Cast Prepare and Finish. I then set the cast time to 3 seconds, which would be plenty of time. That didnt work. Then I tried making the finish 3 seconds and that didnt work either.
Something is wrong here. Would it help if I posted the map or something?
Also: The unit doesnt have any other orders that would really override the animation. He can't be ordered to move or attack normally. I removed both of those. Right now, the only ability he has is the Attack (Savior - Ability) ability that I gave him.
I got it!
I was supposed to make the "Name" field: Cast I thought you could name it whatever you wanted. I then made the the time type Duration and time variant -1
What other names can go into the Name field ?
its basically anything. its a label you can later refer to, to get the animation. for example the actor action Animation Clear has a name label field in it; you will have to put that 'name' of your animation in there to get it cleared.
:)