- Joined
- Jul 19, 2007
- Messages
- 855
I've copied 2 abilities from a spellpack into one of my maps and I know I've copied all triggers needed for it and all abilities, buffs and dummies required and the abilities aren't getting any error while saving the map. I've just edited the name of the 2 abilities but they work the same way and I haven't edited anything else than just the ability names and some special effects it creates for it but rest should be the same but still they aren't working :-/ I can't see what's wrong. When I'm casting the 2 abilities they actually starts making the effects of it but then just stops immediately :-/ So what could actually be wrong? I can't see anything missing for them and I know I have copied all triggers needed for them and all abilities, buffs and dummies required.. The triggers of the 2 abilties are these ones under..
These triggers are required for both of the abilities..
These triggers are required for both of the abilities..
-
Initialization
-
Events
-
Time - Elapsed game time is 0.00 seconds
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set PowerChainHash = (Last created hashtable)
-
Trigger - Run Abilities <gen> (ignoring conditions)
-
-
-
GUI SpellEvent
-
Events
-
Conditions
-
Actions
-
Custom script: local integer i = 0
-
-------- - --------
-
Custom script: call ExecuteFunc("InitSpellEvent")
-
-------- - --------
-
Hashtable - Create a hashtable
-
Set SpellEventHash = (Last created hashtable)
-
-------- - --------
-
Custom script: loop
-
Custom script: exitwhen udg_SpellEventAbility[i] == 0
-
Custom script: call SaveTriggerHandle(udg_SpellEventHash, udg_SpellEventAbility[i], 0, udg_SpellEventTrigger[i])
-
Custom script: set i = i + 1
-
Custom script: endloop
-
Custom script: endfunction
-
-------- - --------
-
Custom script: function OnSpell takes nothing returns boolean
-
Custom script: local trigger t = LoadTriggerHandle(udg_SpellEventHash, GetSpellAbilityId(), 0)
-
-------- - --------
-
Custom script: call TriggerExecute(t)
-
-------- - --------
-
Custom script: set t = null
-
Custom script: return false
-
Custom script: endfunction
-
-------- - --------
-
Custom script: function InitSpellEvent takes nothing returns nothing
-
Custom script: local trigger t = CreateTrigger()
-
Custom script: call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
-
Custom script: call TriggerAddCondition(t, Condition(function OnSpell))
-
Custom script: set t = null
-
-
-
Abilities
-
Events
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set sorHashOrb = (Last created hashtable)
-
Set SpellEventAbility[0] = Moon Spiral Heart Attack
-
Set SpellEventTrigger[0] = Orb Cast <gen>
-
Hashtable - Create a hashtable
-
Set sorHashWither = (Last created hashtable)
-
Set SpellEventAbility[1] = Shine Aqua Illusion
-
Set SpellEventTrigger[1] = Shine Aqua Illusion Cast <gen>
-
-------- - --------
-
Trigger - Run GUI SpellEvent <gen> (ignoring conditions)
-
-------- - --------
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
-
Orb Cast
-
Events
-
Conditions
-
Actions
-
Set tempUnit0 = (Casting unit)
-
Set tempPlayer = (Owner of tempUnit0)
-
Set tempInteger0 = (Hero level of tempUnit0)
-
Set tempLoc0 = (Position of tempUnit0)
-
Set tempLoc1 = (Target point of ability being cast)
-
Set tempReal0 = (Angle from tempLoc0 to tempLoc1)
-
Custom script: call RemoveLocation(udg_tempLoc1)
-
Custom script: set udg_tempLoc1 = null
-
Set tempLoc2 = (tempLoc0 offset by sorOrbSpeed towards tempReal0 degrees)
-
Custom script: call RemoveLocation(udg_tempLoc0)
-
Custom script: set udg_tempLoc0 = null
-
Unit - Create 1 Moon Spiral Heart Attack (Missile) for tempPlayer at tempLoc2 facing tempReal0 degrees
-
Custom script: call RemoveLocation(udg_tempLoc2)
-
Custom script: set udg_tempLoc2 = null
-
Unit Group - Add (Last created unit) to sorOrbGroup
-
Set sorCountOrb = (sorCountOrb + 1)
-
Set tempInteger1 = (Key (Last created unit))
-
Hashtable - Save Handle OftempUnit0 as (Key source) of tempInteger1 in sorHashOrb
-
Hashtable - Save tempInteger0 as (Key level) of tempInteger1 in sorHashOrb
-
Hashtable - Save tempReal0 as (Key angle) of tempInteger1 in sorHashOrb
-
Hashtable - Save tempReal0 as (Key spin) of tempInteger1 in sorHashOrb
-
Hashtable - Save 0.00 as (Key distance) of tempInteger1 in sorHashOrb
-
Hashtable - Save 0 as (Key shardtimer) of tempInteger1 in sorHashOrb
-
Hashtable - Save False as (Key exp) of tempInteger1 in sorHashOrb
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Orb Missile <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Orb Missile <gen>
-
-
Else - Actions
-
-
-
-
Orb Missile
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
sorCountOrb Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Unit Group - Pick every unit in sorOrbGroup and do (Actions)
-
Loop - Actions
-
Set tempUnit0 = (Picked unit)
-
Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
-
Set tempReal0 = (Load (Key distance) of tempInteger0 from sorHashOrb)
-
Set tempReal1 = (Load (Key angle) of tempInteger0 from sorHashOrb)
-
Set tempLoc0 = (Position of tempUnit0)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempReal0 Greater than or equal to sorOrbRange
-
-
Then - Actions
-
Unit Group - Remove tempUnit0 from sorOrbGroup
-
Unit - Kill tempUnit0
-
Set sorCountOrb = (sorCountOrb - 1)
-
-------- - --------
-
-------- - --------
-
Hashtable - Clear all child hashtables of child tempInteger0 in sorHashOrb
-
-
Else - Actions
-
Set tempPlayer = (Owner of tempUnit0)
-
Set tempLoc1 = (tempLoc0 offset by sorOrbSpeed towards tempReal1 degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load (Key exp) of tempInteger0 from sorHashOrb) Equal to False
-
-
Then - Actions
-
Set tempGroup = (Units within sorOrbRadius of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structure)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(tempGroup is empty) Equal to False
-
-
Then - Actions
-
Hashtable - Save True as (Key exp) of tempInteger0 in sorHashOrb
-
Hero - Add 1 experience to (Load (Key source) of tempInteger0 in sorHashOrb), Show level-up graphics
-
-
Else - Actions
-
-
Unit Group - Remove all units from tempGroup
-
Custom script: call DestroyGroup(udg_tempGroup)
-
-
Else - Actions
-
-
Unit - Move tempUnit0 instantly to tempLoc1
-
Custom script: call RemoveLocation(udg_tempLoc1)
-
Custom script: set udg_tempLoc1 = null
-
-------- - --------
-
Set tempInteger2 = (Load (Key shardtimer) of tempInteger0 from sorHashOrb)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempInteger2 Equal to 0
-
-
Then - Actions
-
Set tempUnit1 = (Load (Key source) of tempInteger0 in sorHashOrb)
-
Hashtable - Save 2 as (Key shardtimer) of tempInteger0 in sorHashOrb
-
Set tempReal1 = (Load (Key spin) of tempInteger0 from sorHashOrb)
-
Hashtable - Save (tempReal1 + sorOrbSpin) as (Key spin) of tempInteger0 in sorHashOrb
-
For each (Integer A) from 0 to 3, do (Actions)
-
Loop - Actions
-
Set tempReal1 = (tempReal1 + (90.00 x (Real((Integer A)))))
-
Set tempLoc1 = (tempLoc0 offset by (0.50 x sorOrbCollision) towards tempReal1 degrees)
-
Unit - Create 1 Moon Spiral Heart Attack (Hearts) for tempPlayer at tempLoc1 facing tempReal1 degrees
-
Custom script: call RemoveLocation(udg_tempLoc1)
-
Custom script: set udg_tempLoc1 = null
-
Unit Group - Add (Last created unit) to sorOrbShardGroup
-
Set sorCountShard = (sorCountShard + 1)
-
Set tempInteger1 = (Key (Last created unit))
-
Hashtable - Save Handle OftempUnit1 as (Key source) of tempInteger1 in sorHashOrb
-
Hashtable - Save (Load (Key level) of tempInteger0 from sorHashOrb) as (Key level) of tempInteger1 in sorHashOrb
-
Hashtable - Save tempReal1 as (Key angle) of tempInteger1 in sorHashOrb
-
Hashtable - Save 0.00 as (Key distance) of tempInteger1 in sorHashOrb
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Heart Missile <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Heart Missile <gen>
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
Hashtable - Save (tempInteger2 - 1) as (Key shardtimer) of tempInteger0 in sorHashOrb
-
-
-
-------- - --------
-
Hashtable - Save (tempReal0 + sorOrbSpeed) as (Key distance) of tempInteger0 in sorHashOrb
-
-
-
Custom script: call RemoveLocation(udg_tempLoc0)
-
Custom script: set udg_tempLoc0 = null
-
-
-
-
-
-
-
Heart Missile
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
sorCountShard Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Unit Group - Pick every unit in sorOrbShardGroup and do (Actions)
-
Loop - Actions
-
Set tempUnit0 = (Picked unit)
-
Set tempPlayer = (Owner of tempUnit0)
-
Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
-
Set tempReal0 = (Load (Key distance) of tempInteger0 from sorHashOrb)
-
Set tempLoc0 = (Position of tempUnit0)
-
Set tempGroup = (Units within sorOrbCollision of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structur
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(tempGroup is empty) Equal to False
-
tempReal0 Greater than or equal to sorOrbRadius
-
-
-
-
Then - Actions
-
Unit Group - Remove tempUnit0 from sorOrbShardGroup
-
Unit - Kill tempUnit0
-
Set sorCountShard = (sorCountShard - 1)
-
-------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(tempGroup is empty) Equal to False
-
-
Then - Actions
-
Set tempReal1 = sorOrbCollision
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Set tempUnit1 = (Picked unit)
-
Set tempLoc1 = (Position of tempUnit1)
-
Set tempReal2 = (Distance between tempLoc0 and tempLoc1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempReal2 Less than tempReal1
-
-
Then - Actions
-
Set tempReal1 = tempReal2
-
Set tempUnit2 = tempUnit1
-
-
Else - Actions
-
-
Unit Group - Remove tempUnit1 from tempGroup
-
-
-
Custom script: call DestroyGroup(udg_tempGroup)
-
Set tempUnit3 = (Load (Key source) of tempInteger0 in sorHashOrb)
-
Set tempReal3 = (sorOrbDmgBase + (sorOrbDmgLFactor x (Real(((Load (Key level) of tempInteger0 from sorHashOrb) - 1)))))
-
Unit - Cause tempUnit3 to damage tempUnit2, dealing tempReal3 damage of attack type Spells and damage type Magic
-
Special Effect - Create a special effect attached to the chest of tempUnit2 using Abilities\Spells\Items\AIil\AIilTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-------- - --------
-
Hashtable - Clear all child hashtables of child tempInteger0 in sorHashOrb
-
-
Else - Actions
-
Set tempReal1 = (Load (Key angle) of tempInteger0 from sorHashOrb)
-
Set tempLoc1 = (tempLoc0 offset by (0.50 x sorOrbCollision) towards tempReal1 degrees)
-
Unit - Move tempUnit0 instantly to tempLoc1
-
Custom script: call RemoveLocation(udg_tempLoc1)
-
Custom script: set udg_tempLoc1 = null
-
Hashtable - Save (tempReal0 + (0.50 x sorOrbCollision)) as (Key distance) of tempInteger0 in sorHashOrb
-
-
-
Custom script: call RemoveLocation(udg_tempLoc0)
-
Custom script: set udg_tempLoc0 = null
-
-
-
-
-
-
-
Shine Aqua Illusion Cast
-
Events
-
Conditions
-
Actions
-
Custom script: local unit c = GetSpellAbilityUnit()
-
Custom script: local unit t = GetSpellTargetUnit()
-
Custom script: local real x0 = GetUnitX(c)
-
Custom script: local real y0 = GetUnitY(c)
-
Custom script: local real x1 = GetUnitX(t)
-
Custom script: local real y1 = GetUnitY(t)
-
Custom script: local location l0 = GetUnitLoc(c)
-
Custom script: local location l1 = GetUnitLoc(t)
-
Custom script: local real z0 = GetLocationZ(l0) + GetUnitFlyHeight(c) + udg_sorWitherLightZ
-
Custom script: local real z1 = GetLocationZ(l1) + GetUnitFlyHeight(t) + udg_sorWitherLightZ
-
Custom script: call RemoveLocation(l1)
-
Custom script: set l1 = null
-
Custom script: set udg_tempUnit0 = c
-
Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
-
Custom script: set udg_tempUnit1 = t
-
Custom script: set udg_tempInteger1 = GetHandleId(udg_tempUnit1)
-
Set tempPlayer = (Owner of tempUnit0)
-
Unit Group - Add tempUnit0 to sorWitherCasters
-
Set sorCountWither = (sorCountWither + 1)
-
Custom script: call CreateNUnitsAtLoc(1, 'h025', udg_tempPlayer, l0, bj_UNIT_FACING)
-
Custom script: call RemoveLocation(l0)
-
Custom script: set l0 = null
-
Set tempUnit2 = (Last created unit)
-
Unit - Set level of Shine Aqua Illusion (Slow) for tempUnit2 to (Hero level of tempUnit0)
-
Hashtable - Save Handle OftempUnit2 as (Key buff0) of tempInteger0 in sorHashWither
-
Hashtable - Save Handle OftempUnit1 as (Key target) of tempInteger0 in sorHashWither
-
Hashtable - Save (sorWitherDamageBase x intervalAbilityProjectile) as (Key dpt) of tempInteger0 in sorHashWither
-
Custom script: set udg_tempLight = AddLightningEx("DRAM", true, x0, y0, z0, x1, y1, z1)
-
Hashtable - Save Handle OftempLight as (Key light) of tempInteger0 in sorHashWither
-
Lightning - Change color of tempLight to (0.40 0.60 1.00) with 1.00 alpha
-
Hashtable - Save 0 as (Key effecttimer) of tempInteger0 in sorHashWither
-
Hero - Add 1 experience to tempUnit0, Show level-up graphics
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Shine Aqua Illusion Effects <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Shine Aqua Illusion Effects <gen>
-
-
Else - Actions
-
-
-
-
Shine Aqua Illusion Effects
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
sorCountWither Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Unit Group - Pick every unit in sorWitherCasters and do (Actions)
-
Loop - Actions
-
Set tempUnit0 = (Picked unit)
-
Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
-
Set tempLight = (Load (Key light) of tempInteger0 in sorHashWither)
-
Set tempUnit1 = (Load (Key buff0) of tempInteger0 in sorHashWither)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of tempUnit0) Not equal to (Order(drain))
-
-
Then - Actions
-
Unit Group - Remove tempUnit0 from sorWitherCasters
-
Set sorCountWither = (sorCountWither - 1)
-
Unit - Remove tempUnit1 from the game
-
Lightning - Destroy tempLight
-
Hashtable - Clear all child hashtables of child tempInteger0 in sorHashWither
-
-
Else - Actions
-
Set tempLoc0 = (Position of tempUnit0)
-
Set tempUnit2 = (Load (Key target) of tempInteger0 in sorHashWither)
-
Set tempLoc1 = (Position of tempUnit2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((tempUnit2 is dead) Equal to True) or ((Distance between tempLoc0 and tempLoc1) Greater than sorWitherRangeMax)
-
-
Then - Actions
-
Unit - Order tempUnit0 to Stop
-
-
Else - Actions
-
Custom script: set udg_tempReal0 = GetLocationZ(udg_tempLoc0) + GetUnitFlyHeight(udg_tempUnit0) + udg_sorWitherLightZ
-
Custom script: set udg_tempReal1 = GetLocationZ(udg_tempLoc1) + GetUnitFlyHeight(udg_tempUnit2) + udg_sorWitherLightZ
-
Custom script: call MoveLightningEx(udg_tempLight, true, GetLocationX(udg_tempLoc0), GetLocationY(udg_tempLoc0), udg_tempReal0, GetLocationX(udg_tempLoc1), GetLocationY(udg_tempLoc1), udg_tempReal1)
-
Custom script: call RemoveLocation(udg_tempLoc0)
-
Custom script: set udg_tempLoc0 = null
-
Custom script: call RemoveLocation(udg_tempLoc1)
-
Custom script: set udg_tempLoc1 = null
-
Set tempReal0 = (Load (Key dpt) of tempInteger0 from sorHashWither)
-
Unit - Cause tempUnit0 to damage tempUnit2, dealing tempReal0 damage of attack type Spells and damage type Magic
-
Set tempInteger1 = (Load (Key effecttimer) of tempInteger0 from sorHashWither)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempInteger1 Equal to 0
-
-
Then - Actions
-
Unit - Order tempUnit1 to Human Sorceress - Slow tempUnit2
-
Hashtable - Save 4 as (Key effecttimer) of tempInteger0 in sorHashWither
-
-
Else - Actions
-
Hashtable - Save (tempInteger1 - 1) as (Key effecttimer) of tempInteger0 in sorHashWither
-
-
-
-
-
-
-
-
-
-
-
-