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

Taunt, Fear and such spells

Status
Not open for further replies.
Level 7
Joined
Nov 6, 2009
Messages
279
How do you make such spells without using a really low timer interval? Well you can, but still they're not uncancelable (is that a word?!) like DotA's berserker's call...

(By uncancelable i mean that if you order a unit to attack a widget every 0.035 seconds while its owner repeatidely orders it do something else it just rotates and does nothing...)
 
You don't need a periodic trigger. Just add the unit affected by the spell in a Unit Group and use this:
  • Trigger
  • Events
    • Unit - A unit is issued an order with no target
    • Unit - A unit is issued an order targeting an object
    • Unit - A unit is issues an order targeting a point
  • Conditions
    • ((Triggering unit) is in UnitGroup) Equal to True
  • Actions
    • Set Unit1 = (Load (Key(caster)) of (Key(Triggering unit)) from Hashtable)
    • Unit - Order (Triggering unit) to Attack Unit1
It uses hashtable as you can see. The caster is the unit casting the Berserker's call ability, who is saved to the affected unit, so that you can order the affected unit to attack him, whenever it is issued another order.
 
Level 7
Joined
Nov 6, 2009
Messages
279
You don't need a periodic trigger. Just add the unit affected by the spell in a Unit Group and use this:
  • Trigger
  • Events
    • Unit - A unit is issued an order with no target
    • Unit - A unit is issued an order targeting an object
    • Unit - A unit is issues an order targeting a point
  • Conditions
    • ((Triggering unit) is in UnitGroup) Equal to True
  • Actions
    • Set Unit1 = (Load (Key(caster)) of (Key(Triggering unit)) from Hashtable)
    • Unit - Order (Triggering unit) to Attack Unit1
It uses hashtable as you can see. The caster is the unit casting the Berserker's call ability, who is saved to the affected unit, so that you can order the affected unit to attack him, whenever it is issued another order.

Awesome! I'd never thought of that!
 
Status
Not open for further replies.
Top