- Joined
- Apr 24, 2012
- Messages
- 5,113
Spell(Kinetic Pulsar) |
[trigger=]KP Config
Events Map initialization Conditions Actions -------- 0=0=0=0 -------- -------- Hashtable -------- -------- 0=0=0=0 -------- Custom script: call DestroyGroup(udg_KP_TempGroup) Set KP_Hash = (Last created hashtable) -------- 0=0=0=0=0 -------- -------- Objects used -------- -------- 0=0=0=0=0 -------- Set KP_Abilities[1] = Kinetic Pulsar Set KP_Abilities[2] = KP STun Set KP_Abilities[3] = KP Lightning Set KP_Units[1] = KP Dummy[1] Set KP_Units[2] = KP Dummy[3] -------- 0=0=0=0=0=0=0=0 -------- -------- CONFIGURATION -------- -------- 0=0=0=0=0=0=0=0 -------- -------- Determines the AoE of Damage -------- Set KP_AoE = 250.00 -------- Determines the Damage -------- Set KP_Damage[1] = 100.00 Set KP_Damage[2] = 200.00 Set KP_Damage[3] = 300.00 -------- Determines how far the orbs go outwards. -------- Set KP_BaseAoE = 600.00 -------- Determines how height of the lightning -------- Set KP_Height = 75.00 -------- Determines the Lightning Effect -------- Set KP_LightningEffect = DRAM -------- Determines the Max number of Pulses -------- Set KP_MaxPulses = 5.00 -------- Determines the number of orbs released per interval -------- Set KP_Orbs = 9 -------- Determines the angle per sides -------- Set KP_Sides = 45.00 -------- Determines the buff -------- Set KP_Buff = Stunned(Custom) (Pause) -------- Determines the distance of orbs from the starting point -------- Set KP_StartDistance = 100.00 -------- Determines how long does each orbs last -------- Set KP_Duration = 5.00 [/trigger][trigger=]KP Cast Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Kinetic Pulsar Actions -------- 0=0=0=0=0 -------- -------- VARIABLES -------- -------- 0=0=0=0=0 -------- Set KP_Caster = (Triggering unit) Custom script: set udg_KP_CasterHandle = GetHandleId(udg_KP_Caster) -------- Determines the number pulses currently released -------- Set KP_CurrentPulses = 0.00 -------- Saving Variable -------- Hashtable - Save KP_CurrentPulses as 5 of KP_CasterHandle in KP_Hash -------- Starting Loop -------- Unit Group - Add KP_Caster to KP_CasterGroup [/trigger][trigger=]KP Pulses Events Time - Every 2.00 seconds of game time Conditions Actions Unit Group - Pick every unit in KP_CasterGroup and do (Actions) Loop - Actions -------- Loading Variables -------- Set KP_PickedCaster = (Picked unit) Custom script: set udg_KP_PickedHandle = GetHandleId(udg_KP_PickedCaster) Set KP_CurrentPulses = (Load 5 of KP_PickedHandle from KP_Hash) Set KP_Levels = (Level of KP_Abilities[1] for KP_PickedCaster) Set KP_MaxPulses = 5.00 -------- Checking -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KP_CurrentPulses Less than KP_MaxPulses Then - Actions -------- Creating Orbs -------- Set KP_PickedLoc = (Position of KP_PickedCaster) For each (Integer A) from 1 to KP_Orbs, do (Actions) Loop - Actions Set KP_Offset = (KP_PickedLoc offset by KP_StartDistance towards ((Real((Integer A))) x KP_Sides) degrees) Unit - Create 1 KP_Units[1] for (Owner of KP_PickedCaster) at KP_Offset facing ((Real((Integer A))) x KP_Sides) degrees Set KP_Loc = (Position of (Last created unit)) Set KP_DummyOffset = (KP_Loc offset by KP_BaseAoE towards (Facing of (Last created unit)) degrees) Unit - Add KP_Abilities[3] to (Last created unit) Unit - Set level of KP_Abilities[3] for (Last created unit) to KP_Levels Unit - Order (Last created unit) to Move To KP_DummyOffset Unit - Add a KP_Duration second Generic expiration timer to (Last created unit) -------- Cleaning Leaks -------- Custom script: call RemoveLocation(udg_KP_Offset) Custom script: call RemoveLocation(udg_KP_Loc) Custom script: call RemoveLocation(udg_KP_DummyOffset) -------- Saving Variable -------- Hashtable - Save (KP_CurrentPulses + 1.00) as 5 of KP_PickedHandle in KP_Hash -------- Cleaning Leak -------- Custom script: call RemoveLocation(udg_KP_PickedLoc) Else - Actions -------- Clean Up -------- Hashtable - Clear all child hashtables of child KP_PickedHandle in KP_Hash Unit Group - Remove KP_PickedCaster from KP_CasterGroup [/trigger][trigger=]KP Lightning Check Events Time - Every 0.04 seconds of game time Conditions Actions Set KP_DummyGroup = (Units in (Playable map area) matching (((((Matching unit) is in KP_LightningGroup) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((Level of KP Lightning for (Matching unit)) Greater than 0))) Unit Group - Pick every unit in KP_DummyGroup and do (Actions) Loop - Actions -------- Add units to lightning group -------- Unit Group - Add (Picked unit) to KP_LightningGroup If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in KP_LightningGroup) Greater than 0 Then - Actions Trigger - Turn on KP Lightning <gen> Else - Actions Custom script: call DestroyGroup(udg_KP_DummyGroup) [/trigger][trigger=]KP Lightning Events Time - Every 0.04 seconds of game time Conditions Actions Unit Group - Pick every unit in KP_LightningGroup and do (Actions) Loop - Actions Set KP_DummyP = (Picked unit) Set KP_DummyLevels = (Level of KP_Abilities[3] for KP_DummyP) Custom script: set udg_KP_UHandle = GetHandleId(udg_KP_DummyP) -------- Checking if picked unit is alive -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (KP_DummyP is alive) Equal to True Then - Actions -------- Unit Setup -------- Set KP_DummyLoc = (Position of KP_DummyP) -------- Lightning Clean up -------- For each (Integer KP_I) from 1 to KP_UHandle, do (Actions) Loop - Actions Lightning - Destroy (Load KP_I of KP_UHandle in KP_Hash) Set KP_I = 0 Set KP_TempGroup = (Units within KP_AoE of KP_DummyLoc) Unit Group - Pick every unit in KP_TempGroup and do (Actions) Loop - Actions -------- Target Acquiring -------- Set KP_TempUnit = (Picked unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (KP_TempUnit belongs to an ally of (Owner of KP_DummyP)) Equal to True (KP_TempUnit is in KP_LightningGroup) Equal to True KP_TempUnit Equal to KP_DummyP Then - Actions -------- Effects -------- Set KP_I = (KP_I + 1) Set KP_TempLoc = (Position of KP_TempUnit) Custom script: set udg_KP_TempZ = GetLocationZ (udg_KP_DummyLoc) + udg_KP_Height Custom script: set udg_KP_TempZ2= GetLocationZ (udg_KP_TempLoc) + udg_KP_Height Custom script: set udg_KP_TempLightning = AddLightningEx(udg_KP_LightningEffect , true, GetLocationX(udg_KP_DummyLoc), GetLocationY(udg_KP_DummyLoc), udg_KP_TempZ, GetLocationX(udg_KP_TempLoc), GetLocationY(udg_KP_TempLoc), udg_KP_TempZ2) Custom script: call RemoveLocation(udg_KP_TempLoc) Hashtable - Save Handle OfKP_TempLightning as KP_I of KP_UHandle in KP_Hash Else - Actions Set KP_DamageGroup[1] = (Units within KP_AoE of KP_DummyLoc matching (((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) is alive) Equal to True))) and (((Matching unit) belongs to an enemy of (Owner Set KP_DamageGroup[2] = (Random 1 units from KP_DamageGroup[1]) -------- Starts Stun and Damage -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in KP_DamageGroup[1]) Greater than 0 Then - Actions Unit Group - Pick every unit in KP_DamageGroup[2] and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) has buff KP_Buff) Not equal to True Then - Actions Set KP_DamageP = (Picked unit) Set KP_DamageLoc = (Position of KP_DamageP) Unit - Create 1 KP_Units[2] for (Owner of KP_DummyP) at KP_DamageLoc facing Default building facing degrees Unit - Add KP_Abilities[2] to (Last created unit) Unit - Set level of KP_Abilities[2] for (Last created unit) to KP_DummyLevels Unit - Order (Last created unit) to Human Mountain King - Storm Bolt KP_DamageP Unit - Add a 1.00 second Generic expiration timer to (Last created unit) -------- Cleans Leak -------- Custom script: call RemoveLocation(udg_KP_DamageLoc) Else - Actions Else - Actions -------- Cleaning Leaks -------- Hashtable - Save KP_I as 0 of KP_UHandle in KP_Hash Custom script: call RemoveLocation(udg_KP_DummyLoc) Custom script: call DestroyGroup(udg_KP_DamageGroup[1]) Custom script: call DestroyGroup(udg_KP_DamageGroup[2]) Custom script: call DestroyGroup(udg_KP_TempGroup) Else - Actions -------- Clean up -------- For each (Integer KP_I) from 1 to KP_UHandle, do (Actions) Loop - Actions Lightning - Destroy (Load KP_I of KP_UHandle in KP_Hash) Unit Group - Remove KP_DummyP from KP_LightningGroup Hashtable - Clear all child hashtables of child KP_UHandle in KP_Hash If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in KP_LightningGroup) Equal to 0 Then - Actions Trigger - Turn off (This trigger) Else - Actions [/trigger] |
Problem
|
-Pulses never end -Lightning doesnt show -Group Pick doesnt work -Stun doesnt work -doesnt pick units with the ability kp lightning |
I really need your help |