• 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.

[Spell] Active Spells

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Does each spell for each tower can be activated by Players ?
Or does it totally passive ?
(Triggered when enemy comes near it) ?

I mean like, you said that each Tower has a spell right ?
Does this spell is activate-able (Player activates it) ?
Or it just a dummy spell, where the spell can only be activated via enemy comes close ?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Make a trigger.

  • Autocast
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Runecaster (Dwarf)
    • Actions
      • Set r = (Random percentage)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • r Less than or equal to 40.00
        • Then - Actions
          • Unit - Order (Attacking unit) to Night Elf Druid Of The Talon - Faerie Fire (Attacked unit)
        • Else - Actions
This is a trigger I'm currently using for basic AI in a map, it causes the cast to cast a derivative of the Faerie Fire spell on attack. The "r = random percentage" part is to induce a bit of "randomness" in the AI, so it won't always cast when available.

You can take the order part out of the If/Then/Else if you want it to always cast.

NOTE: The towers need to have an attack for this method to work.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
How if I got a lot of spells? I need to trigger it one by one?
Yes you have to, don't be lazy ;p
Unless you have a setup trigger (I prefer Hashtable).
Then you can combine the Event altogether instead creating 1 Event per Ability.

  • Custom script: call IssueImmediateOrder(whichunit, "faeriefireon")
Don't Faerie Fire by default (auto-cast enabled) targets allied units ?
The tower should be targeting enemies... ?
 
Status
Not open for further replies.
Top