• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How can I make a unit attack when I press a keyboard key?

Status
Not open for further replies.
remove the regular attack and do damage with the spell, and dont usedefend that just makes no sense. use any activated spell (preferably channel) and do when unit begins casting an ability. i dont know how you want to choose who to attack thats up to you.
 
Do you want the unit to be able to attack ONLY if defend is on? I can also solve the problem of auto aquiring targets, i solve this tomorrow when i get home at night. Do you work with GUI or JASS? Show me your progress so far.
 
Do you want the unit to be able to attack ONLY if defend is on? I can also solve the problem of auto aquiring targets, i solve this tomorrow when i get home at night. Do you work with GUI or JASS? Show me your progress so far.

I'm afraid I'm proficient with neither...:hohum:

Burnthemprisons, one of my problems is getting the spells to target and fire using triggers... otherwise, I would have tried something like carrion swarm... Or maybe I misinterpretted?

Another problem I have, though, is that my computer can't really override the spells animations too well... for some reason, my WE is missing Art-Animation, or whatever it is...
 
I'm afraid I'm proficient with neither...:hohum:

Burnthemprisons, one of my problems is getting the spells to target and fire using triggers... otherwise, I would have tried something like carrion swarm... Or maybe I misinterpretted?

Another problem I have, though, is that my computer can't really override the spells animations too well... for some reason, my WE is missing Art-Animation, or whatever it is...

Huh, ok, I guess I'll try that...
But, still, my original question kinda stands...:confused:

Edit: Ok, I got the patch from Blizzard...

Is there a trigger order that makes a unit cast a custom ability at a certain point...?

Wait a sec- Yelyanra, I don't work with Jass, but what is GUI? Is that just what the normal world editor triggers are (I work with those)?


So, anyways, here's my code...:
  • Attack Copy
    • Events
      • Unit - Fighter 0002 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to NewAttack
    • Actions
      • Animation - Reset Fighter 0002 <gen>'s animation
      • Unit - Order Fighter 0002 <gen> to Attack Ground (Center of LiamsThreatenedZone)
      • Wait 4.00 seconds
      • Animation - Reset Fighter 0002 <gen>'s animation
Liam's Threatened Zone, by the way, is a region that always moves in front of Fighter 0002's facing direction.
The idea is, of course, is that he'll carrion swarm (i.e., new attack) the center of that region. The problem is, I can't seem to get him to do so...
 
Last edited:
Status
Not open for further replies.
Back
Top