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!
This is a spell I made, inspired by wyrmlord's hashtable tutorial! (Thank you, for the great tut!)
[Though I must say I haven't 'stolen' anything, just made a spell, similar to the examples.]
This is a fairly simple, 3 level spell.
If cast on allies it heals for 10 secs. (Formula: [(Level of ability) x 10] + 30)
If cast on enemies it damages for 10 secs. (Formula: [(Level of ability) x 10] + 3)
Update v1.1: It slows the unit by 30%. If an enemy dies with this effect it will damage all enemies around him. If an ally dies with this effect - it will heal all allies.
Update v1.2: Fixed leaky positions.
Init Copy
Events
Map initialization
Conditions
Actions
-------- --> Creates the hashtable for the spell. --------
Hashtable - Create a hashtable
Set Hasttable_LP = (Last created hashtable)
LP Start
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Life Power
Actions
-------- --> Checks whether unit is already under the effect of Life Power. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is in LifePower_units) Equal to False
Then - Actions
-------- --> This is the special effect and Slow effect. --------
Set Slow_Posit = (Position of (Target unit of ability being cast))
Unit - Create 1 Slow_Dummy for (Owner of (Casting unit)) at Slow_Posit facing Default building facing degrees
Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Orc\Voodoo\VoodooAuraTarget.mdl
-------- -->Sets all the data we need for later use. --------
Hashtable - Save 10.00 as 0 of (Key (Target unit of ability being cast)) in Hasttable_LP
Hashtable - Save Handle Of(Last created special effect) as 1 of (Key (Target unit of ability being cast)) in Hasttable_LP
Hashtable - Save Handle Of(Casting unit) as 2 of (Key (Target unit of ability being cast)) in Hasttable_LP
Unit Group - Add (Target unit of ability being cast) to LifePower_units
-------- --> Orders caster to stop if unit already has the effect of Life Power. --------
Unit - Order (Casting unit) to Stop
Game - Display to (Player group((Owner of (Casting unit)))) the text: That unit ais alrea...
Life Power Spell
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in LifePower_units and do (Actions)
Loop - Actions
-------- --> Setting all we saved in the previous trigger. --------
Set LP_Remaining_Time = (Load 0 of (Key (Picked unit)) from Hasttable_LP)
Set Effect_LP = (Load 1 of (Key (Picked unit)) in Hasttable_LP)
Set LP_Caster = (Load 2 of (Key (Picked unit)) in Hasttable_LP)
-------- --> Checks how many seconds are left. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LP_Remaining_Time Greater than 0.00
Then - Actions
-------- --> Checks whether the target is allied or enemy. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Picked unit)) is an enemy of (Owner of LP_Caster)) Equal to True
Then - Actions
-------- --> Damages the unit. Formula: ([Level of Life Power] x 10) + 20 {You can always change that to suit your needs.} --------
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (((Real((Level of Life Power for LP_Caster))) x 10.00) + 30.00))
Hashtable - Save (LP_Remaining_Time - 1.00) as 0 of (Key (Picked unit)) in Hasttable_LP
Else - Actions
-------- --> Heals the unit. Formula: ([Level of Life Power] x 10) + 20 {You can always change that to suit your needs.} --------
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (((Real((Level of Life Power for LP_Caster))) x 10.00) + 30.00))
Hashtable - Save (LP_Remaining_Time - 1.00) as 0 of (Key (Picked unit)) in Hasttable_LP
Else - Actions
-------- Clears the unit from the unit group. --------
Special Effect - Destroy Effect_LP
Unit Group - Remove (Picked unit) from LifePower_units
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hasttable_LP
LP OnDeath Trigger
Events
Unit - A unit Dies
Conditions
((Dying unit) is in LifePower_units) Equal to True
Actions
Set Dying_Posit = (Position of (Dying unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) belongs to an enemy of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 350.00 of Dying_Posit matching ((((Matching unit) belongs to an enemy of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to Fal and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
Unit - Cause (Load 2 of (Key (Dying unit)) in Hasttable_LP) to damage (Picked unit), dealing ((Real((Level of Life Power for (Load 2 of (Key (Dying unit)) in Hasttable_LP)))) x 25.00) damage of attack type Chaos and damage type Divine
Else - Actions
Unit Group - Pick every unit in (Units within 350.00 of Dying_Posit matching ((((Matching unit) belongs to an ally of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to Fals and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIre\AIreTarget.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Level of Life Power for (Load 2 of (Key (Dying unit)) in Hasttable_LP)))) x 25.00))
00:19, 1st Dec 2009
TriggerHappy:
This spell is far to simple. It looks really cheap and could have definitely been done a lot easier.
It also leaks. But that doesn't matter since the simplicity of this spell is just too much.
uh you do know this isnt going to be approved right? its wayyy too simple add some special things to it and you might have a chance.
try making it flashier and things like that.
o and like santa said post triggers in description.
2/5 right now
ill take a look in about an hour. be back then with a full review.
hmm i see you did not fix any of the memory leaks. wherever there is a postion of a unit you have to clear it.
teres 1 in the first trigger.
2 in the third trigger.
thats all i saw from looking over it.
Come on, please. If somebody has downloaded it - you can rate it. I would appreciate it.
Also report any problems you find and perhaps suggestions for improvement?
first Change Casting Unit by Triggering UNit & Thx for brining this MUI but i think when some1 make hashtable he should add GUI MUI version for poeple that are not using 1.23 more chance from seeing people using ur spell
first Change Casting Unit by Triggering UNit & Thx for brining this MUI but i think when some1 make hashtable he should add GUI MUI version for poeple that are not using 1.23 more chance from seeing people using ur spell
So,
1. Can you please explain what the is difference between casting unit and triggering unit in this case?
2. I didn't understand that very well... Hashtables are avaliable in 1.24+, right ? But what can I do... I made this spell, because I saw how hashtables are used ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.