- Joined
- Aug 1, 2009
- Messages
- 620
Need some help with a variable some were
Within the code i have placed 2 "XXXXX...." commets.
Within thise comments the code does not work and i don't know how to fix it...
it seems to forget what units are in the "PrimalGraspGroup" group..
Thanks in advance
Within the code i have placed 2 "XXXXX...." commets.
Within thise comments the code does not work and i don't know how to fix it...
it seems to forget what units are in the "PrimalGraspGroup" group..

-
Primal Grasp Loop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set PrimalReal = (PrimalReal + 0.05)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
PrimalReal Equal to 0.70
-
-
Then - Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Animation - Play PrimalGraspUnit[(Integer A)]'s attack animation
-
-
-
Set PrimalGraspGroup = (Units within 400.00 of PrimalGraspPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to False)) and ((((Matching unit) belongs to an enemy of (Owner of PrimalGraspCaster)) Equal to True) and (((Matching un
-
Unit Group - Pick every unit in PrimalGraspGroup and do (Actions)
-
Loop - Actions
-
Set PrimalGraspTarget = (Picked unit)
-
Set DamageCalc = (Life of PrimalGraspTarget)
-
Set TempPoint2 = (Position of PrimalGraspTarget)
-
Unit - Cause PrimalGraspCaster to damage PrimalGraspTarget, dealing PrimalGraspDamage damage of attack type Spells and damage type Normal
-
Floating Text - Create floating text that reads ((String((Integer((DamageCalc - (Life of PrimalGraspTarget)))))) + !) at TempPoint2 with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change (Last created floating text): Disable suspend state
-
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
-
Custom script: call RemoveLocation(udg_TempPoint2)
-
If ((MeatHookTarget is dead) Equal to True) then do (Unit Group - Remove PrimalGraspTarget from PrimalGraspGroup) else do (Do nothing)
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
PrimalReal Greater than 0.70
-
-
Then - Actions
-
-------- XXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
-
Unit Group - Pick every unit in PrimalGraspGroup and do (Actions)
-
Loop - Actions
-
Set PrimalGraspTarget = (Picked unit)
-
Set TempPoint3 = (Position of PrimalGraspTarget)
-
Set TempPoint4 = (TempPoint3 offset by 20.00 towards (Angle from TempPoint3 to PrimalGraspPoint) degrees)
-
Custom script: call SetUnitX(udg_PrimalGraspTarget, GetLocationX(udg_TempPoint4))
-
Custom script: call SetUnitY(udg_PrimalGraspTarget, GetLocationY(udg_TempPoint4))
-
Custom script: call RemoveLocation(udg_TempPoint3)
-
Custom script: call RemoveLocation(udg_TempPoint4)
-
-
-
-------- XXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
-
For each (Integer PrimalGraspCounter) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set TempPoint3 = (Position of PrimalGraspUnit[PrimalGraspCounter])
-
Set TempPoint4 = (TempPoint3 offset by 15.00 towards (Angle from TempPoint3 to PrimalGraspPoint) degrees)
-
Custom script: call SetUnitX(udg_PrimalGraspUnit[udg_PrimalGraspCounter], GetLocationX(udg_TempPoint4))
-
Custom script: call SetUnitY(udg_PrimalGraspUnit[udg_PrimalGraspCounter], GetLocationY(udg_TempPoint4))
-
Custom script: call RemoveLocation(udg_TempPoint3)
-
Custom script: call RemoveLocation(udg_TempPoint4)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
PrimalReal Greater than 1.10
-
-
Then - Actions
-
Custom script: call DestroyGroup(udg_PrimalGraspGroup)
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Unit - Remove PrimalGraspUnit[(Integer A)] from the game
-
-
-
Custom script: call RemoveLocation(udg_PrimalGraspPoint)
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Thanks in advance