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

Spell triggers

Status
Not open for further replies.
Depends on what you mean by "counter" and "any spell".

If I got you correctly with that "any spell" part, it's actually not that simple. You would have to store every ability in the map in a global array variable (that's the hard part), then you can probably use a dummy caster to cast the spell (to make it look like the hero is casting). You would then use that global array with a random index.

Yeah, that's a pretty clumsy way to do it, but I don't think there's a better one.

What do you mean by "counter"?
 
Just combine the 2 last posts:
When your unit is targeted by a spell use a random integer and if the integer is the right one create a dummy unit that casts the same spell on the enemy.

Like DSG said: this only works for target spells (Storm Bolt, Entangling Roots)
 
the integer worked i tried this event: unit is attacked... action: if random integer from 1-100 is equals to 15 .... then do (Unit- Set life of attacking unit) to life of attacking unit -200) . But i still dont know how to make it cast a spell cause the spell is preset and i cant pick my own custom spell.


i also add you all rep.
 
I figured it out
i made a dummy with 10 hp cannot move scaling value and size = .10 and its model file is an ability so it has no model file so the dummy cant be seen its abilities are chain lightning and immolation with 2 damage per second that only hurt it self to kill the dummy.
i made the triggers like this event : if unit is attacked , IF then Else .. Condition : if random integer 1 -100 is less or equal to 15 . Then cr8 a dummy at unit position of the attacked unit . Order last created unit to cast far seer-chain lightning(worked even if i used another chain lightning) at the attackers?
 
I figured it out
i made a dummy with 10 hp cannot move scaling value and size = .10 and its model file is an ability so it has no model file so the dummy cant be seen its abilities are chain lightning and immolation with 2 damage per second that only hurt it self to kill the dummy.

You don't have to do all this stuff. Not to mention that the dummy is still killable and selectable. Just create a new dummy, give it Permanent Invisibility, Locust, change invisibility's fade time to 0.00 and make a new trigger that will kill the dummy as soon as it finishes casting its spell.
 
Status
Not open for further replies.
Back
Top