- Joined
- Oct 10, 2009
- Messages
- 111
The title says it all.
Triggers:
I'm a beginner with indexing so there's probably some problem there.
If you're wondering what the spell's supposed to do:
- Upon initial impact, it deals damage equal to intelligence X level of ability and heals for half of that damage. Afterwards, it periodically deals damage and heals hero with each tick.
Triggers:
-
Soul Bolt INT
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Soul Bolt
-
-
Actions
-
-------- Setting up basic things (you can change them to your bidding, Master) --------
-
Set mxIndex_SB = (mxIndex_SB + 1)
-
-------- x --------
-
-------- x --------
-
-------- Setting the casting unit --------
-
Set castUnitInxSB[mxIndex_SB] = (Triggering unit)
-
-------- x --------
-
-------- Setting up the intelligence for our Hero (easy configuration later on) --------
-
Set inxUnitIntSB[mxIndex_SB] = (Real((Intelligence of castUnitInxSB[mxIndex_SB] (Include bonuses))))
-
-------- x --------
-
Set castCurLifeSB = (Integer((Life of castUnitInxSB[mxIndex_SB])))
-
-------- Setting up the targeted unit --------
-
Set targetUnitInxSB[mxIndex_SB] = targetUnitInxSB[mxIndex_SB]
-
-------- x --------
-
Set castLocSB[0] = (Position of castUnitInxSB[mxIndex_SB])
-
Set castLocSB[1] = (Position of targetUnitInxSB[mxIndex_SB])
-
-------- Setting up the level of ability --------
-
Set spellLVLinxSB[mxIndex_SB] = (Level of Soul Bolt for castUnitInxSB[mxIndex_SB])
-
-------- x --------
-
-------- Setting up the impact damage (Intelligence x Level of Ability) --------
-
Set impactDmgInxSB = (inxUnitIntSB[mxIndex_SB] x (Real(spellLVLinxSB[mxIndex_SB])))
-
-------- x --------
-
-------- Setting up the heal (Half of the Impact Damage) --------
-
Set impactHealInxSB = (impactDmgInxSB / 2.00)
-
-------- x --------
-
-------- Setting up the damage increase per level (Qurater of Intelligence) --------
-
Set dmgIncreaseInxSB = (inxUnitIntSB[mxIndex_SB] / 4.00)
-
-------- x --------
-
-------- Setting up Periodic damage (Fifth of the INT of hero) --------
-
Set periodicDmgInxSB = ((Integer(inxUnitIntSB[mxIndex_SB])) / 5)
-
-------- x --------
-
-------- Setting up the periodic heal --------
-
Set periodicHealInxSB = 30
-
-------- x --------
-
-------- Setting the bleed duration --------
-
Set durationSB = 4
-
Set durationInxSB = 1
-
-------- x --------
-
-------- x --------
-
Set timeLeftInxSB[mxIndex_SB] = (durationSB + (durationInxSB x spellLVLinxSB[mxIndex_SB]))
-
-------- x --------
-
-------- Setting up Special Effects (Change by your bidding, Master) --------
-
Set preDefSESB[0] = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Set preDefSESB[1] = Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
-
Set preDefSESB[2] = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
mxIndex_SB Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Soul Bolt Impact <gen>
-
-
Else - Actions
-
-
-
-
Soul Bolt Impact
-
Events
-
Conditions
-
Actions
-
For each (Integer tmpINT) from 1 to mxIndex_SB, do (Actions)
-
Loop - Actions
-
-------- Change only the type of lightning below if you want; should not touch the rest --------
-
Unit - Cause castUnitInxSB[tmpINT] to damage targetUnitInxSB[tmpINT], dealing impactDmgInxSB damage of attack type Spells and damage type Death
-
Unit - Set life of castUnitInxSB[tmpINT] to ((Life of castUnitInxSB[tmpINT]) + impactHealInxSB)
-
Special Effect - Create a special effect attached to the overhead of castUnitInxSB[tmpINT] using preDefSESB[1]
-
Set specEffectSB[0] = (Last created special effect)
-
Special Effect - Create a special effect attached to the chest of targetUnitInxSB[mxIndex_SB] using preDefSESB[0]
-
Set specEffectSB[1] = (Last created special effect)
-
Lightning - Create a Drain Life lightning effect from source castLocSB[0] to target castLocSB[1]
-
Set lightInxSESB[0] = (Last created lightning effect)
-
-
-
For each (Integer A) from 0 to 1, do (Actions)
-
Loop - Actions
-
Special Effect - Destroy specEffectSB[(Integer A)]
-
Lightning - Destroy lightInxSESB[(Integer A)]
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
mxIndex_SB Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
Soul Bolt Periodic
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer tmpINT) from 1 to mxIndex_SB, do (Actions)
-
Loop - Actions
-
Unit - Cause castUnitInxSB[tmpINT] to damage targetUnitInxSB[tmpINT], dealing (Real(periodicDmgInxSB)) damage of attack type Spells and damage type Death
-
Unit - Set life of castUnitInxSB[tmpINT] to ((Life of castUnitInxSB[tmpINT]) + (Real(periodicHealInxSB)))
-
Special Effect - Create a special effect attached to the chest of targetUnitInxSB[mxIndex_SB] using preDefSESB[2]
-
Set specEffectSB[2] = (Last created special effect)
-
Lightning - Create a Drain Life lightning effect from source castLocSB[0] to target castLocSB[1]
-
Set lightInxSESB[0] = (Last created lightning effect)
-
Set timeLeftInxSB[tmpINT] = (timeLeftInxSB[tmpINT] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
timeLeftInxSB[tmpINT] Equal to 0
-
(Life of targetUnitInxSB[tmpINT]) Less than or equal to 0.41
-
-
Then - Actions
-
Set castUnitInxSB[tmpINT] = castUnitInxSB[mxIndex_SB]
-
Set castUnitInxSB[mxIndex_SB] = No unit
-
Set targetUnitInxSB[tmpINT] = targetUnitInxSB[mxIndex_SB]
-
Set targetUnitInxSB[mxIndex_SB] = No unit
-
Set spellLVLinxSB[tmpINT] = spellLVLinxSB[mxIndex_SB]
-
Set mxIndex_SB = (mxIndex_SB - 1)
-
Set tmpINT = (tmpINT - 1)
-
-
Else - Actions
-
-
-
-
For each (Integer A) from 0 to 2, do (Actions)
-
Loop - Actions
-
Special Effect - Destroy specEffectSB[(Integer A)]
-
Lightning - Destroy lightInxSESB[(Integer A)]
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
mxIndex_SB Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
I'm a beginner with indexing so there's probably some problem there.
If you're wondering what the spell's supposed to do:
- Upon initial impact, it deals damage equal to intelligence X level of ability and heals for half of that damage. Afterwards, it periodically deals damage and heals hero with each tick.