• 🏆 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!

[Trigger] Affecting a Units Attack cooldown

Status
Not open for further replies.
Level 6
Joined
Feb 25, 2005
Messages
230
Well hi there,

I have made a spell, enabling a hero to swing his sword manually, dealing damage to enemies in range of his sword (the hero is a blademaster).

The spell is based on a 'Howl of Terror', but that is just to have a 'triggerer-spell' with no target (the spell actually has no effects of itself, except playing the Hero's attack animation).

This is what happens when using the spell:
Removed some floating texts and sounds in the trigger to make it cleaner... tell me if you want the whole trigger.

  • Slice
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slice
    • Actions
      • Set tempPoint[2] = ((Position of (Triggering unit)) offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Wait 0.11 seconds
      • Set tempUnitGroup[1] = (Units within 100.00 of tempPoint[2] matching ((((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is A structure) Equal to False)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in tempUnitGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (X) damage of attack type Hero and damage type Normal
--


Here's the problem: After using this spell, dealing damage to enemies, you can simply attack them again (using the 'normal' attack). This enables a sort of 'double strike', or even 'triple strike' if the player goes like this: attack - slice - attack. I would like the spell to count on the units attack-cooldown, not allowing him to attack directly afterwards.

Can this be done in the Object Editor or in GUI?

Any help appreciated.
 
Level 8
Joined
Jul 23, 2005
Messages
329
Why don't you set a variable that says that the player wants to slice on his next attack?

So there would be two triggers. One that detects the player casting the spell and sets a variable.

The other detects an attack, checks if the variable is on, then PISHOO with your spell.
 
Level 6
Joined
Feb 25, 2005
Messages
230
Maybe i dont want the spell to be casted repeatedly and automatically?

---

Anyway i figured a way to prevent the triple strike, using a dummy unit that casts a manipulated 'Silence' on the hero. The silent prevents melee attacks only, and lasts 1.82 seconds = the hero's attack cooldown.

But that doesnt matter, i changed my mind about how the combat play should be in the game.

-This thread may now be closed-
 
Status
Not open for further replies.
Top