- Joined
- Feb 22, 2006
- Messages
- 31
im making a 3d Shooter map alike Elimination tournament. however i seem to have a problem with my hovering projectile's flying heights when it come close to a high-amplitude height change. thoses r my creation/movement triggers:
--------------------------------------------------------------------------
-------------------------------------------------------------------------
as you can see, my dummy unit folows a x-y-z trajectory written in its mana.
it also uses its life to retain its base flying height, and then adjust it depending on the terrain height. however, my projectile seems to become crazy for like 0.1 sec when it comes on the really border of a deep hole or Z elevation difference. How can i fix that?
note: my unit movement is "hovering"
-
Create missiles
-
Events
- Unit - A unit Is issued an order targeting a point
-
Conditions
- (Issued order) Equal to Human Mortar Team - Flare
-
Actions
- Unit - Create 1 Laser for Player 1 (Red) at ((Position of (Triggering unit)) offset by 70.00 towards (Facing of (Triggering unit)) degrees) facing (Angle from (Position of (Triggering unit)) to (Target point of issued order)) degrees
- Special Effect - Create a special effect attached to the origin of (Last created unit) using war3mapimported/Projectile.mdl
- Unit - Turn collision for (Last created unit) Off
- Set VerticalDistance = ((Z height of (Position of (Triggering unit))) - (Z height of (Target point of issued order)))
- Set HorizontalDistance = (Distance between (Position of (Triggering unit)) and (Target point of issued order))
- Set Angle = (Atan((VerticalDistance / HorizontalDistance)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Angle Less than 0.00
-
Then - Actions
- Unit Group - Add (Last created unit) to MissilesGoUp
- Set Angle = (Angle - (2.00 x Angle))
- Unit - Set mana of (Last created unit) to Angle
-
Else - Actions
- Unit Group - Add (Last created unit) to MissilesGoDown
- Unit - Set mana of (Last created unit) to Angle
-
If - Conditions
- Unit - Set life of (Last created unit) to ((Z height of (Position of (Triggering unit))) + 60.00)
- Game - Display to (All players) the text: (String((Mana of (Last created unit))))
-
Events
--------------------------------------------------------------------------
-
Move
-
Events
- Time - Every 0.06 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in MissilesGoDown and do (Actions)
-
Loop - Actions
- Unit - Add Crow Form to (Picked unit)
- Set TempPoint1 = (Position of (Picked unit))
- Set TempPoint2 = (TempPoint1 offset by ((80.00 x (Cos((Mana of (Picked unit))))) + 0.00) towards (Facing of (Picked unit)) degrees)
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (80.00 x (Sin((Mana of (Picked unit))))))
- Animation - Change (Picked unit) flying height to ((Life of (Picked unit)) - (Z height of TempPoint2)) at 0.00
- Unit - Move (Picked unit) instantly to TempPoint2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Current flying height of (Picked unit)) Less than or equal to 25.00
-
Then - Actions
- Unit - Kill (Picked unit)
- Else - Actions
-
If - Conditions
- Unit - Remove Crow Form from (Picked unit)
- Animation - Set current animation for (Picked unit) to its (90 - (Integer((Mana of (Picked unit)))))th animation
- Custom script: call RemoveLocation (udg_TempPoint1)
- Custom script: call RemoveLocation (udg_TempPoint2)
-
Loop - Actions
-
Unit Group - Pick every unit in MissilesGoUp and do (Actions)
-
Loop - Actions
- Unit - Add Crow Form to (Picked unit)
- Set TempPoint1 = (Position of (Picked unit))
- Set TempPoint2 = (TempPoint1 offset by ((80.00 x (Cos((Mana of (Picked unit))))) + 0.00) towards (Facing of (Picked unit)) degrees)
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (80.00 x (Sin((Mana of (Picked unit))))))
- Animation - Change (Picked unit) flying height to ((Life of (Picked unit)) - (Z height of TempPoint2)) at 0.00
- Unit - Move (Picked unit) instantly to TempPoint2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Current flying height of (Picked unit)) Less than or equal to 25.00
-
Then - Actions
- Unit - Kill (Picked unit)
- Else - Actions
-
If - Conditions
- Unit - Remove Crow Form from (Picked unit)
- Animation - Set current animation for (Picked unit) to its (90 + (Integer((Mana of (Picked unit)))))th animation
- Custom script: call RemoveLocation (udg_TempPoint1)
- Custom script: call RemoveLocation (udg_TempPoint2)
-
Loop - Actions
-
Unit Group - Pick every unit in MissilesGoDown and do (Actions)
-
Events
-------------------------------------------------------------------------
as you can see, my dummy unit folows a x-y-z trajectory written in its mana.
it also uses its life to retain its base flying height, and then adjust it depending on the terrain height. however, my projectile seems to become crazy for like 0.1 sec when it comes on the really border of a deep hole or Z elevation difference. How can i fix that?
note: my unit movement is "hovering"