- Joined
- May 27, 2012
- Messages
- 116
Okay i got problem with the ''Camera Map'' and i cant figure out how to solve this as the camera map keeps changing the height of the camera so get location z dosnt work i need some how to get the height in the camera map...
Heres the main trigger:
Heres the main trigger:
-
MS Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in MS_Units and do (Actions)
-
Loop - Actions
-
Set TempINT = (Player number of (Owner of (Picked unit)))
-
-------- Animation --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
MS_Up[TempINT] Equal to True
-
MS_Down[TempINT] Equal to True
-
MS_Left[TempINT] Equal to True
-
MS_Right[TempINT] Equal to True
-
-
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_AnimTime[TempINT] Greater than or equal to MS_AnimLength[TempINT]
-
-
Then - Actions
-
Set MS_AnimTime[TempINT] = 0.00
-
Set TempUnit = (Picked unit)
-
Custom script: call SetUnitAnimationByIndex((udg_TempUnit),(udg_MS_AnimNumber[udg_TempINT]))
-
Set TempUnit = No unit
-
-
Else - Actions
-
Set MS_AnimTime[TempINT] = (MS_AnimTime[TempINT] + 0.03)
-
-
-
-
Else - Actions
-
-
-------- MoveUnit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Ensnare (Ground)) Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Down[TempINT] Equal to True
-
-
Then - Actions
-
Set TempPoint[1] = (Position of (Picked unit))
-
Set TempPoint[2] = (TempPoint[1] offset by (MS_Speed[TempINT] x -0.50) towards (Facing of (Picked unit)) degrees)
-
Set CP_Point = (TempPoint[1] offset by -50.00 towards (Facing of (Picked unit)) degrees)
-
Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CP_PointIsWalkable Equal to True
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint[2]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TempPoint[1])
-
Custom script: call RemoveLocation (udg_TempPoint[2])
-
Custom script: call RemoveLocation(udg_CP_Point)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Left[TempINT] Equal to True
-
-
Then - Actions
-
Set TempPoint[1] = (Position of (Picked unit))
-
Set TempPoint[2] = (TempPoint[1] offset by (MS_Speed[TempINT] x 0.50) towards ((Facing of (Picked unit)) + 90.00) degrees)
-
Set CP_Point = (TempPoint[1] offset by 50.00 towards ((Facing of (Picked unit)) + 90.00) degrees)
-
Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CP_PointIsWalkable Equal to True
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint[2]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TempPoint[1])
-
Custom script: call RemoveLocation (udg_TempPoint[2])
-
Custom script: call RemoveLocation(udg_CP_Point)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Up[TempINT] Equal to True
-
-
Then - Actions
-
Set TempPoint[1] = (Position of (Picked unit))
-
Set TempPoint[2] = (TempPoint[1] offset by MS_Speed[TempINT] towards (Facing of (Picked unit)) degrees)
-
Set CP_Point = (TempPoint[1] offset by 50.00 towards (Facing of (Picked unit)) degrees)
-
Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CP_PointIsWalkable Equal to True
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint[2]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TempPoint[1])
-
Custom script: call RemoveLocation (udg_TempPoint[2])
-
Custom script: call RemoveLocation(udg_CP_Point)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Right[TempINT] Equal to True
-
-
Then - Actions
-
Set TempPoint[1] = (Position of (Picked unit))
-
Set TempPoint[2] = (TempPoint[1] offset by (MS_Speed[TempINT] x 0.50) towards ((Facing of (Picked unit)) - 90.00) degrees)
-
Set CP_Point = (TempPoint[1] offset by 50.00 towards ((Facing of (Picked unit)) - 90.00) degrees)
-
Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CP_PointIsWalkable Equal to True
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint[2]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TempPoint[1])
-
Custom script: call RemoveLocation (udg_TempPoint[2])
-
Custom script: call RemoveLocation(udg_CP_Point)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-------- Camera --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Cam_Right[TempINT] Equal to True
-
-
Then - Actions
-
Set Cam_Roation[TempINT] = (Cam_Roation[TempINT] - 2.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Cam_Left[TempINT] Equal to True
-
-
Then - Actions
-
Set Cam_Roation[TempINT] = (Cam_Roation[TempINT] + 2.00)
-
-
Else - Actions
-
-
Camera - Set (Owner of (Picked unit))'s camera Distance to target to 300.00 over 0.00 seconds
-
Camera - Set (Owner of (Picked unit))'s camera Rotation to Cam_Roation[TempINT] over 0.03 seconds
-
Camera - Set (Owner of (Picked unit))'s camera Angle of attack to 345.00 over 0.00 seconds
-
Unit - Make PlayerUnit[TempINT] face Cam_Roation[TempINT] over 0.03 seconds
-
Selection - Select PlayerUI[TempINT] for (Owner of (Picked unit))
-
-------- CameraHeight --------
-
Set TempPoint[1] = (Position of PlayerUnit[TempINT])
-
Custom script: set udg_TempReal[1] = GetLocationZ (udg_TempPoint[1])
-
Set TempReal[2] = ((TempReal[1] / 2.00) + 100.00)
-
Game - Display to (All players) the text: (Real 1 = + (String(TempReal[1])))
-
Game - Display to (All players) the text: (Real 2 = + (String(TempReal[2])))
-
Camera - Set (Owner of (Picked unit))'s camera Height Offset to TempReal[2] over 0.03 seconds
-
-
-
-