- Joined
- Feb 21, 2009
- Messages
- 136
Okay so I made this Missile Rocket system.. and I want it so that the rocket cannot make short angles.. like that if the target is behind the rocket it will turn around within milliseconds.. Negative angles probably don't even exist, I'm just very confused.. How can I fix this?
-
Rocket
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in Temp_Force and do (Actions)
-
Loop - Actions
- Set Temp_Point = (Position of Rocket[(Player number of (Picked player))])
- Set Temp_Point2 = (Position of RocketTraget[(Player number of (Picked player))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Temp_Point and Temp_Point2) Less than or equal to 90.00
- (Rocket[(Player number of (Picked player))] is alive) Equal to True
-
Then - Actions
- Custom script: call RemoveLocation (udg_Temp_Point)
- Custom script: call RemoveLocation (udg_Temp_Point2)
- Unit - Cause Rocket[(Player number of (Picked player))] to damage RocketTraget[(Player number of (Picked player))], dealing 5000.00 damage of attack type Spells and damage type Normal
- Unit - Kill Rocket[(Player number of (Picked player))]
-
Else - Actions
- Custom script: call RemoveLocation (udg_Temp_Point)
- Custom script: call RemoveLocation (udg_Temp_Point2)
- Set Temp_Point2 = (Position of Rocket[(Player number of (Picked player))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of RocketTraget[(Player number of (Picked player))]) Equal to Transport Helicopter
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set Temp_Point = (Position of RocketTraget[(Player number of (Picked player))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Angle from Temp_Point2 to Temp_Point) Less than or equal to 5.00
- (Angle from Temp_Point2 to Temp_Point) Greater than or equal to -5.00
-
Then - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing (Angle from Temp_Point2 to Temp_Point) degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Angle from Temp_Point2 to Temp_Point) Less than 5.00
-
Then - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing ((Facing of Rocket[(Player number of (Picked player))]) + 5.00) degrees
-
Else - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing ((Facing of Rocket[(Player number of (Picked player))]) - 5.00) degrees
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
-
If - Conditions
- Set Temp_Point = (Temp_Point2 offset by 55.00 towards (Facing of Rocket[(Player number of (Picked player))]) degrees)
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Custom script: call RemoveLocation (udg_Temp_Point2)
-
If - Conditions
-
Loop - Actions
-
Player Group - Pick every player in Temp_Force and do (Actions)
-
Events
-
Then - Actions
- Set Temp_Point = (Position of RocketTraget[(Player number of (Picked player))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Angle from Temp_Point2 to Temp_Point) Less than or equal to 5.00
- (Angle from Temp_Point2 to Temp_Point) Greater than or equal to -5.00
-
Then - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing (Angle from Temp_Point2 to Temp_Point) degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Angle from Temp_Point2 to Temp_Point) Less than 5.00
-
Then - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing ((Facing of Rocket[(Player number of (Picked player))]) + 5.00) degrees
-
Else - Actions
- Unit - Move Rocket[(Player number of (Picked player))] instantly to Temp_Point2, facing ((Facing of Rocket[(Player number of (Picked player))]) - 5.00) degrees
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation (udg_Temp_Point)