- Joined
- Jun 20, 2021
- Messages
- 5
Hi there!
Im having trouble creating a spell, that is pulling nearby enemies towards a central location.
I'm using two triggers to achieve this effect:
Does anyone have an idea why that may happen? Let me know, if I can provide additional information, that might be helpful in solving this.
Im having trouble creating a spell, that is pulling nearby enemies towards a central location.
I'm using two triggers to achieve this effect:
-
Gravitational Rift
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Gravitational Rift (Void Mage)
-
-
Actions
-
Set VariableSet endPoint = (Target point of ability being cast)
-
Set VariableSet tempReal = (1.60 + (0.40 x (Real((Level of Gravitational Rift (Void Mage) for (Triggering unit))))))
-
Set VariableSet tempDmg = ((15.00 + (5.00 x (Real((Level of Gravitational Rift (Void Mage) for (Triggering unit)))))) + (0.50 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
-
Special Effect - Create a special effect at endPoint using war3mapImported\Void Disc.mdx
-
Hashtable - Save Handle OfendPoint as 50 of (Key (Triggering unit).) in missileTable.
-
Hashtable - Save tempReal as 51 of (Key (Triggering unit).) in missileTable.
-
Hashtable - Save tempDmg as 52 of (Key (Triggering unit).) in missileTable.
-
Hashtable - Save Handle Of(Last created special effect) as 53 of (Key (Triggering unit).) in missileTable.
-
Unit Group - Add (Triggering unit) to riftCasters
-
Trigger - Turn on Gravitational Rift Loop <gen>
-
-
-
Gravitational Rift Loop
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in riftCasters and do (Actions)
-
Loop - Actions
-
Set VariableSet tempUnit = (Picked unit)
-
Set VariableSet tempPoint = (Load 50 of (Key (Picked unit).) in missileTable.)
-
Set VariableSet tempReal = (Load 51 of (Key (Picked unit).) from missileTable.)
-
Set VariableSet tempDmg = (Load 52 of (Key (Picked unit).) from missileTable.)
-
Set VariableSet tempEffect = (Load 53 of (Key (Picked unit).) in missileTable.)
-
Set VariableSet tempReal = (tempReal - 0.10)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempReal Greater than 0.00
-
-
Then - Actions
-
Hashtable - Save tempReal as 51 of (Key (Picked unit).) in missileTable.
-
Set VariableSet tempGroup = (Units within 400.00 of tempPoint matching ((((Matching unit) is alive) Equal to Wahr) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit)).) Equal to Wahr) and (((Matching unit) is in projectiles.) Equal to Falsch))).)
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet startPoint = (Position of (Picked unit))
-
Set VariableSet endPoint = (startPoint offset by 10.00 towards (Angle from startPoint to tempPoint) degrees.)
-
Unit - Move (Picked unit) instantly to endPoint
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between tempPoint and endPoint) Less than or equal to 250.00
-
-
Then - Actions
-
Unit - Cause tempUnit to damage (Picked unit), dealing (tempDmg / 10.00) damage of attack type Spells and damage type Magic
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_startPoint)
-
Custom script: call RemoveLocation(udg_endPoint)
-
-
-
Custom script: call DestroyGroup(udg_tempGroup)
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from riftCasters.
-
Special Effect - Destroy tempEffect
-
Custom script: call RemoveLocation(udg_tempPoint)
-
Custom script: call ClearSubTable(udg_missileTable, GetHandleIdBJ(GetEnumUnit()), 50, 53)
-
If ((Number of units in riftCasters) Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
-
-
-
-
-
-
Does anyone have an idea why that may happen? Let me know, if I can provide additional information, that might be helpful in solving this.