oorosco
New Member
- Reaction score
- 23
Hello-
It's me, oorosco trying to createa GUI pudge-wars hook and i'm having a bit of trouble and can't figure out why it's not working...
It seems to create too much chain units- so much that it crashes the game... i don't know why.
Other than the crash it looks smooth, etc.
It's me, oorosco trying to createa GUI pudge-wars hook and i'm having a bit of trouble and can't figure out why it's not working...
It seems to create too much chain units- so much that it crashes the game... i don't know why.
Code:
creating dummies
Events
Time - Every 0.05 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
(Custom value of Hook_caster[(Integer A)]) Not equal to Hook_range[(Integer A)]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hook_range[(Integer A)] Equal to 10
Then - Actions
Else - Actions
Set Hook_range[(Integer A)] = (Hook_range[(Integer A)] + 10)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hook_range[(Integer A)] Greater than 0
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hook_range[(Integer A)] Equal to 10
Then - Actions
Unit - Create 1 Hook-Dummy Glaive for (Owner of Hook_caster[(Integer A)]) at ((Position of Hook_caster[(Integer A)]) offset by 200.00 towards (Facing of Hook_caster[(Integer A)]) degrees) facing (Facing of Hook_caster[(Integer A)]) degrees
Unit - Set the custom value of (Last created unit) to 1
Unit Group - Add (Last created unit) to Location_Groups[(Integer A)]
Else - Actions
For each (Integer B) from 1 to (Hook_range[(Integer A)] / 10), do (Actions)
Loop - Actions
Set leading_unit = No unit
Set Unit_temp = No unit
Unit Group - Pick every unit in Location_Groups[(Integer A)] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Picked unit)) Equal to (Integer B)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer B) Equal to 1
Then - Actions
Set Point_temp = (Position of (Picked unit))
Unit - Move (Picked unit) instantly to (Point_temp offset by 30.00 towards Hook_angle[(Integer A)] degrees)
Custom script: call RemoveLocation(udg_Point_temp)
Else - Actions
Set leading_unit = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer B) Equal to ((Integer A) / 10)
Then - Actions
Set Unit_temp = (Picked unit)
Set int_temp = (Custom value of (Picked unit))
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Picked unit)) Equal to ((Integer B) - 1)
Then - Actions
Set Unit_temp = (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
leading_unit Not equal to No unit
Unit_temp Not equal to No unit
Then - Actions
Set Point_temp = (Position of Unit_temp)
Unit - Move (Picked unit) instantly to (Point_temp offset by 30.00 towards (Facing of Unit_temp) degrees)
Custom script: call RemoveLocation(udg_Point_temp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Set Point_temp = (Position of Unit_temp)
Unit - Create 1 Hook-Dummy Chain for (Owner of Hook_caster[(Integer A)]) at (Point_temp offset by 10.00 towards (Angle from Point_temp to (Position of Hook_caster[(Integer A)])) degrees) facing (Angle from Point_temp to (Position of Hook_caster[(Integer A)])) degrees
Unit Group - Add (Last created unit) to Location_Groups[(Integer A)]
Unit - Set the custom value of (Last created unit) to int_temp
Custom script: call RemoveLocation(udg_Point_temp)
Game - Display to (All players) the text: asdfasdfasdf
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hook_range[(Integer A)] Equal to 10
Then - Actions
Set Hook_range[(Integer A)] = (Hook_range[(Integer A)] + 10)
Else - Actions
Else - Actions
Other than the crash it looks smooth, etc.