PiCkstix
New Member
- Reaction score
- 18
How would I use this for Point[(Integer A)]?
Thanks.
Thanks.
call RemoveLocation (udg_Point[GetForLoopIndexA()])
call RemoveLocation (udg_Point[1])
call RemoveLocation (udg_Point[2])
call RemoveLocation (udg_Point[3])
call RemoveLocation (udg_Point[1])
call RemoveLocation (udg_Point[2])
call RemoveLocation (udg_Point[3])
...
If you use Integer A, you need to remove it with integer A, else I think you must do...
Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Set p[(Integer A)] = (Center of (Playable map area))
Custom script: call RemoveLocation (udg_p[1])
Custom script: call RemoveLocation (udg_p[2])
Slide
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SlideOn[(Integer A)] Equal to True
Then - Actions
Set Angle[(Integer A)] = (Facing of SlideUnit[(Integer A)])
Set Point[(Integer A)] = (Position of SlideUnit[(Integer A)])
Set Point[(Integer A)] = (Point[(Integer A)] offset by 7.00 towards Angle[(Integer A)] degrees)
Unit - Move SlideUnit[(Integer A)] instantly to Point[(Integer A)]
Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
Else - Actions
See, I have this:
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Custom script: call RemoveLocation (udg_Point[Integer A])
Set Point[1] = Position of (Triggering unit)
Set Point[2] = Point 1 offset by 100 towards 90 degrees
Set Point[3] = Point 1 offset by 100 towards 180 degrees
Set Point[4] = Point 1 offset by 100 towards 270 degrees
Set Point[5] = Point 1 offset by 100 towards 0 degrees
Create 1 [I]Unit[/I] at Point[2] for [I]Player[/I] facing Point[1]
Create 1 [I]Unit[/I] at Point[3] for [I]Player[/I] facing Point[1]
Create 1 [I]Unit[/I] at Point[4] for [I]Player[/I] facing Point[1]
Create 1 [I]Unit[/I] at Point[5] for [I]Player[/I] facing Point[1]
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
Code:For each (Integer A) from 1 to 4, do (Actions) Loop - Actions Custom script: call RemoveLocation (udg_Point[Integer A])
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
set Point[Integer A] = A point
Custom script: call RemoveLocation (udg_Point[GetForLoopIntegerA()])
Edit: OHHH! That's what this whole thread is about!!! So then this would work?
Code:Set Point[1] = Position of (Triggering unit) Set Point[2] = Point 1 offset by 100 towards 90 degrees Set Point[3] = Point 1 offset by 100 towards 180 degrees Set Point[4] = Point 1 offset by 100 towards 270 degrees Set Point[5] = Point 1 offset by 100 towards 0 degrees Create 1 [I]Unit[/I] at Point[2] for [I]Player[/I] facing Point[1] Create 1 [I]Unit[/I] at Point[3] for [I]Player[/I] facing Point[1] Create 1 [I]Unit[/I] at Point[4] for [I]Player[/I] facing Point[1] Create 1 [I]Unit[/I] at Point[5] for [I]Player[/I] facing Point[1] For each (Integer A) from 1 to 5, do (Actions) Loop - Actions Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
You're still leaking. You are overwriting previous point with a new point, thus losing reference to old point and thus, you leak. Make a second point variable and use that for the (point offset by X towards Y)
Set [B]Point[/B][(Integer A)] = (Position of SlideUnit[(Integer A)])
Set [B]Point2[/B][(Integer A)] = (Point[(Integer A)] offset by 7.00 towards Angle[(Integer A)] degrees)