I tried this, and it does damage to the unit, but the unit just stands there and it will not do the attack animation. I have the actor linked, but it says the events to create it are red and I don't know why. I tried to reset them and they are still red. How do I make this work?
Animations (for both weapons and abilities) are played via actor events.
Animations play for already existing weapons because of an actor event that looks something like "Weapon.*.Start" or "Weapon.GaussRifle.Start" with the message "AnimationPlay Attack" or something like that. If you want it to start for your ability you have to create a new event for when that ability is used and send the same action that plays the attack animation.
The actor event would look something like "Ability.YourAbility.SourceCastStart -> Animation Play Attack". You probably also want to add some other events that handle the animation correctly when other stuff happens, for example "UnitMovementUpdate.*.Walk -> AnimationClear Attack" so the animation cancels when the unit starts to move.
These events look like they belong to an action actor. You have to put the events I mentioned into the main unit actor of the unit that is using the ability.
I also don't see any of the things that I mentioned in the list that you posted anyways, so I'm not sure what you mean when you say it is not working.
as well as the other one in the unit actor, and nothing happens still. What am I doing wrong?
Edit: I changed the fields that it already had for the weapon and changed it to my ability and now it works but only the first time you use it.
It seems that the editor doesn't like what I added because they are all red. What is wrong with it? I kept it the same as when it was fine, I just changed the ability that it goes with.
Make your unit's weapon include a set effect at the start of it. Make the set effect, in addition to your weapon effect, include an "issue order" effect that orders the source unit to "stop".
Not sure what your workaround is, but this is the cleanest method.
How do I make autoattack not "auto". Meaning how do I make it so that the unit only attacks once everytime the attack ability is used.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
Make it an ability.
Edit: To clarify, I mean: do not make it a weapon. Make an ability with a hotkey of A that looks and feels like an attack.
@MasterWrath: Go
I tried this, and it does damage to the unit, but the unit just stands there and it will not do the attack animation. I have the actor linked, but it says the events to create it are red and I don't know why. I tried to reset them and they are still red. How do I make this work?
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Animations (for both weapons and abilities) are played via actor events.
Animations play for already existing weapons because of an actor event that looks something like "Weapon.*.Start" or "Weapon.GaussRifle.Start" with the message "AnimationPlay Attack" or something like that. If you want it to start for your ability you have to create a new event for when that ability is used and send the same action that plays the attack animation.
The actor event would look something like "Ability.YourAbility.SourceCastStart -> Animation Play Attack". You probably also want to add some other events that handle the animation correctly when other stuff happens, for example "UnitMovementUpdate.*.Walk -> AnimationClear Attack" so the animation cancels when the unit starts to move.
@Bommes: Go I tried this, but it is not working. this is what I have for the events: (
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
These events look like they belong to an action actor. You have to put the events I mentioned into the main unit actor of the unit that is using the ability.
I also don't see any of the things that I mentioned in the list that you posted anyways, so I'm not sure what you mean when you say it is not working.
@Bommes: Go
Oh! I did not realize I was suppose to put that in the unit actor. I thought I was suppose to do it in the attack action actor. That might help.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
I did
as well as the other one in the unit actor, and nothing happens still. What am I doing wrong?
Edit: I changed the fields that it already had for the weapon and changed it to my ability and now it works but only the first time you use it.
It seems that the editor doesn't like what I added because they are all red. What is wrong with it? I kept it the same as when it was fine, I just changed the ability that it goes with.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
I ended up finding a work-around to the problem so I don't have to do this anymore.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Set the unit's acquire level to "no response".
Make your unit's weapon include a set effect at the start of it. Make the set effect, in addition to your weapon effect, include an "issue order" effect that orders the source unit to "stop".
Not sure what your workaround is, but this is the cleanest method.
The easiest way is to make the player allies so they don't auto attack each other