- Joined
- Sep 29, 2016
- Messages
- 43
Hey guys,
I couldn't find any answer to this case in any thread, so i thought i would ask it over here:
By checking stuff i noticed that inside the Unit Group Action the Tmp_Point and Tmp_Real are not the local variables anymore but the global variables. What would be the correct way to get the values of Tmp_Real and Tmp_Point inside the Unit Group Action, while still using local variables? Initialize and set them every time in the Unit Group?
I couldn't find any answer to this case in any thread, so i thought i would ask it over here:
By checking stuff i noticed that inside the Unit Group Action the Tmp_Point and Tmp_Real are not the local variables anymore but the global variables. What would be the correct way to get the values of Tmp_Real and Tmp_Point inside the Unit Group Action, while still using local variables? Initialize and set them every time in the Unit Group?
-
Events
-
Conditions
-
Actions
-
Custom script: local location udg_Tmp_Point
-
Custom script: local location udg_Tmp_Point2
-
Custom script: local location udg_Tmp_Point3
-
Custom script: local real udg_Tmp_Real
-
Custom script: local real udg_Tmp_Real2
-
Custom script: local real udg_Tmp_Real3
-
Custom script: local group udg_Tmp_UnitGroup
-
Set Tmp_Point = (Position of (Triggering unit))
-
Set Tmp_Point2 = (Target point of ability being cast)
-
Set Tmp_Real = (Angle from Tmp_Point to Tmp_Point2)
-
Set Tmp_UnitGroup = (Units within SAndSFlashofSteelSize of Tmp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))
-
Unit Group - Pick every unit in Tmp_UnitGroup and do (Actions)
-
Loop - Actions
-
Set Tmp_Point3 = (Position of (Picked unit))
-
Set Tmp_Real2 = (Angle from Tmp_Point to Tmp_Point3)
-
Set Tmp_Real3 = (Tmp_Real2 - Tmp_Real)
-
Game - Display to (All players) the text: ((String((X of Tmp_Point))) + (String((Y of Tmp_Point))))
-
Game - Display to (All players) the text: (String(Tmp_Real))
-
-