• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Keyboard Events

Status
Not open for further replies.
Level 19
Joined
Apr 21, 2013
Messages
1,194
Is there a way to make a keyboard event other than the preset events up, down, left and right keys.

For example I want,
Q for attack animation 1
E for attack animation 2
S for defend animation and so on...

All War 3 offers is 4 direction keys.

I just noticed that the keyboard events are skills duh... :(
 
Last edited:
Level 19
Joined
Apr 21, 2013
Messages
1,194
All I want to know is why this spell doesn't work...

  • Attack1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Quick Attack
    • Actions
      • Wait 0.00 seconds
      • Set attack1Caster = (Triggering unit)
      • Custom script: call SetUnitAnimationByIndex(udg_attack1Caster, 4)
      • Set caster1Loc = (Position of attack1Caster)
      • Set attack1Target = (caster1Loc offset by 55.00 towards (Facing of attack1Caster) degrees)
      • Unit Group - Pick every unit in (Units within 50.00 of attack1Target) and do (Actions)
        • Loop - Actions
          • Unit - Cause attack1Caster to damage (Picked unit), dealing 55.00 damage of attack type Normal and damage type Normal
      • Custom script: call RemoveLocation(udg_caster1Loc)
      • Custom script: call RemoveLocation(udg_attack1Target)
It should create a point where the character is looking to. Then it damages a little area. But It only works in a particular degree only.

Don't mind leaks for now, but what should I change I can't see the problem.
 
Level 19
Joined
Apr 21, 2013
Messages
1,194
Why in the world is there a wait?

Else the desired animation won't work, this doesn't work so smooth as well, but it gets the job done :/

I think the range of the unit group is too small for you to realise it did work.

It was really small yes :D now that I've made it bigger it works as intended. :)


EDIT: As Wietlol asked me wtf that WAIT is for, I made it for the wanted animations to work but the unit won't immediately use that animation. It first uses the spell then uses THAT animation. So what can I do to avoid this awkward attack sequence?

Edit2: Now it works fine idk how?!
 
Last edited:
Status
Not open for further replies.
Top