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

Some Spells

Status
Not open for further replies.
Level 5
Joined
Dec 4, 2007
Messages
111
Edit : I accidentally named the tread wrongly this is just for one spell

I hope this isn't too much trouble I want a spell like DotA's berserker's call to help you I'll post here some info I found on the official site

Berserker's Call (A0I6)
Based on Channel.

When it goes into effect, give it an item armor bonus ability (A0I5), set GlobalVariableUnit (OOO0IO) as Axe, GlobalVariableInt (I110I) as 0, and count enemy non ancient (except spirit bear) nondummy non structure alive non cycloned that is not under the effect of Shackles or cyclone. And for each unit on the group do the following: increase GlobalVariableInt by 1, show the FX on the EnumUnit's chest and tell the unit to attack GlobalVariableUnit. Now, save "MaxFX" (GlobalVariableInt), "Hero" (Axe) and "Group" (all the units just affected) to the cache, and create a new trigger which runs 1+0.5*Calllvl seconds later, or whenever a unit is issued an order.

This newly created trigger recovers "Group", "Hero" and "MaxFX" from the cache, and then if it wasn't called because a unit has been issued an order, remove the armor bonus ability from "Hero", destroy the FX of all the units in the group and destroy the group "Group". Finally, disable this trigger. If it was called because a unit has been issued an order, Disable this trigger (to prevent looping), tell the Triggering unit to attack "Hero" and then reenable this trigger.

Note that the standard trigger tries to account for non cycloned units but it fails (the reason I don't know, it checks if the unit has Bcyc buff and if that's false the check comes true), while this one doesn't affect cycloned units for real, the only change is that this one does this check: GetUnitAbilityLevel(GetFilterUnit(),1113815395)==0 (with 1113815395 being Bcyc), while the normal one has GetUnitAbilityLevel(u,1113815395)>0 that asks to be false.


can be done differently it's up to you

Thank you in advance
 
Status
Not open for further replies.
Top