• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Problem

Status
Not open for further replies.
Level 11
Joined
Mar 30, 2008
Messages
666
Problem please help

Hello!
I am using a locked camera system and a save/load system.
When I load the character,my camera stucks at center of playable map area.
Is there a way to change the camera when I load the character and run the lock camera system again?

Camera Triggers
  • SetCamera
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ||||||||||||||||||Rotation||||||||||||||||||| --------
      • -------- Speed of Unlocked Camera Turning : Default = 20 --------
      • Set Rot_Unlocked_Speed = 20.00
      • -------- Speed of Locked Camera Turning : Default = 15 --------
      • Set Rot_Locked_Speed = 15.00
      • -------- Speed it takes locked camera to turn : Default = 0.4 --------
      • Set Rot_Locked_FollowSpeed = 0.40
      • -------- Speed it takes unlocked camera to turn : Default = 0.4 --------
      • Set Rot_Unlocked_FollowSpeed = 0.40
      • -------- ||||||||||||||||||Distance||||||||||||||||||| --------
      • -------- The Lowest Distance from Unit : Default = 460 --------
      • Set Dis_Min = 460.00
      • -------- The Highest Distance from Unit : Default = 1100 --------
      • Set Dis_Max = 1100.00
      • -------- Speed it takes distance to change : Default = 1.0 --------
      • Set Dis_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Angle||||||||||||||||||| --------
      • -------- Cameras Lowest Angle, 360 is Straight Down, 315 is Straight Across : Default = 330 --------
      • Set AoA_Min = 350.00
      • -------- Cameras Highest Angle, 360 is Straight Down, 315 is Straight Across : Default = 342 --------
      • Set AoA_Max = 342.00
      • -------- Speed it takes angle to change : Default = 1.0 --------
      • Set AoA_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Height||||||||||||||||||| --------
      • -------- Cameras Lowest Height off Ground : Default = 152 --------
      • Set Hgt_Min = 152.00
      • -------- Cameras Highest Height off Ground : Default = 280 --------
      • Set Hgt_Max = 280.00
      • -------- Speed it takes height to change : Default = 1.0 --------
      • Set Hgt_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Extra||||||||||||||||||| --------
      • -------- How many camera positions are between Lowest and Highest : Default = 10 --------
      • Set Cam_Intervals = 7
      • -------- Speed at wich the camera follows the unit : Default = 0.35 --------
      • Set Cam_FollowSpeed = 0.35
      • -------- ||||||||||||||||||NEED TO EDIT||||||||||||||||||| --------
      • -------- this enables/disables camera lock for certain players, the number is the player number, add these wherever you wish in your map --------
      • Set Player_CamLock[1] = True
      • Set Player_CamLock[2] = True
      • Set Player_CamLock[3] = True
      • Set Player_CamLock[4] = True
      • Set Player_CamLock[5] = True
      • Set Player_CamLock[6] = True
      • Set Player_CamLock[7] = True
      • Set Player_CamLock[8] = True
      • Set Player_CamLock[9] = True
      • Set Player_CamLock[10] = True
      • Set Player_CamLock[11] = True
      • Set Player_CamLock[12] = True
      • -------- this sets the unit you want to lock a certain players camera to, add these wherever you wish in your map --------
      • Set Player_Unit[1] = Soldier (woot) 0108 <gen>
      • Set Player_Unit[2] = Soldier (woot) 0005 <gen>
      • Set Player_Unit[3] = Soldier (woot) 0007 <gen>
      • Set Player_Unit[4] = Soldier (woot) 0006 <gen>
      • Set Player_Unit[5] = Soldier (woot) 0010 <gen>
      • Set Player_Unit[6] = Soldier (woot) 0011 <gen>
  • Camera Lock
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set TEMP_PlayerGroup[1] = (All players matching (((Matching player) slot status) Equal to Is playing))
      • Player Group - Pick every player in TEMP_PlayerGroup[1] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_CamLock[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Camera_Rotation_Mode[(Player number of (Picked player))] Equal to 0
                • Then - Actions
                  • Camera - Set (Picked player)'s camera Rotation to (Facing of Player_Unit[(Player number of (Picked player))]) over Rot_Locked_FollowSpeed seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Camera_Rotation_Mode[(Player number of (Picked player))] Equal to 1
                    • Then - Actions
                      • Camera - Set (Picked player)'s camera Rotation to Camera_Rotation[(Player number of (Picked player))] over Rot_Unlocked_FollowSpeed seconds
                    • Else - Actions
                      • Do nothing
              • Camera - Set (Picked player)'s camera Distance to target to (Dis_Min + Camera_Distance[(Player number of (Picked player))]) over Dis_FollowSpeed seconds
              • Camera - Set (Picked player)'s camera Angle of attack to (AoA_Min + Camera_AngleofAttack[(Player number of (Picked player))]) over AoA_FollowSpeed seconds
              • Camera - Set (Picked player)'s camera Height Offset to (Hgt_Min + Camera_Height[(Player number of (Picked player))]) over Hgt_FollowSpeed seconds
              • Set TEMP_Point[1] = (Position of Player_Unit[(Player number of (Picked player))])
              • Camera - Pan camera for (Picked player) to TEMP_Point[1] over Cam_FollowSpeed seconds
              • Custom script: call RemoveLocation(udg_TEMP_Point[1])
            • Else - Actions
              • Do nothing
      • Custom script: call DestroyForce (udg_TEMP_PlayerGroup[1])
  • Rotation Lock Toggle
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
    • Actions
      • Game - Display to (All players) the text: <Empty String>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Camera_Rotation_Mode[(Player number of (Triggering player))] Equal to 0
          • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
          • Camera_RotLock_Selection[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Set Camera_Rotation[(Player number of (Triggering player))] = (Facing of Player_Unit[(Player number of (Triggering player))])
          • Set Camera_Rotation_Mode[(Player number of (Triggering player))] = 1
          • Floating Text - Create floating text that reads Camera Rotation Unl... above (Triggering unit) with Z offset 7.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Camera_Rotation_Mode[(Player number of (Triggering player))] Equal to 1
              • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
              • Camera_RotLock_Selection[(Player number of (Triggering player))] Equal to True
            • Then - Actions
              • Set Camera_Rotation_Mode[(Player number of (Triggering player))] = 0
              • Floating Text - Create floating text that reads Camera Rotation Loc... above (Triggering unit) with Z offset 7.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
        • Then - Actions
          • Set Camera_RotLock_Selection[(Player number of (Triggering player))] = True
        • Else - Actions
          • Set Camera_RotLock_Selection[(Player number of (Triggering player))] = False
Thanks! :)
 
Last edited:
Hello!
I am using a locked camera system and a save/load system.
When I load the character,my camera stucks at center of playable map area.
Is there a way to change the camera when I load the character and run the lock camera system again?

Camera Triggers
  • SetCamera
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ||||||||||||||||||Rotation||||||||||||||||||| --------
      • -------- Speed of Unlocked Camera Turning : Default = 20 --------
      • Set Rot_Unlocked_Speed = 20.00
      • -------- Speed of Locked Camera Turning : Default = 15 --------
      • Set Rot_Locked_Speed = 15.00
      • -------- Speed it takes locked camera to turn : Default = 0.4 --------
      • Set Rot_Locked_FollowSpeed = 0.40
      • -------- Speed it takes unlocked camera to turn : Default = 0.4 --------
      • Set Rot_Unlocked_FollowSpeed = 0.40
      • -------- ||||||||||||||||||Distance||||||||||||||||||| --------
      • -------- The Lowest Distance from Unit : Default = 460 --------
      • Set Dis_Min = 460.00
      • -------- The Highest Distance from Unit : Default = 1100 --------
      • Set Dis_Max = 1100.00
      • -------- Speed it takes distance to change : Default = 1.0 --------
      • Set Dis_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Angle||||||||||||||||||| --------
      • -------- Cameras Lowest Angle, 360 is Straight Down, 315 is Straight Across : Default = 330 --------
      • Set AoA_Min = 350.00
      • -------- Cameras Highest Angle, 360 is Straight Down, 315 is Straight Across : Default = 342 --------
      • Set AoA_Max = 342.00
      • -------- Speed it takes angle to change : Default = 1.0 --------
      • Set AoA_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Height||||||||||||||||||| --------
      • -------- Cameras Lowest Height off Ground : Default = 152 --------
      • Set Hgt_Min = 152.00
      • -------- Cameras Highest Height off Ground : Default = 280 --------
      • Set Hgt_Max = 280.00
      • -------- Speed it takes height to change : Default = 1.0 --------
      • Set Hgt_FollowSpeed = 1.00
      • -------- ||||||||||||||||||Extra||||||||||||||||||| --------
      • -------- How many camera positions are between Lowest and Highest : Default = 10 --------
      • Set Cam_Intervals = 7
      • -------- Speed at wich the camera follows the unit : Default = 0.35 --------
      • Set Cam_FollowSpeed = 0.35
      • -------- ||||||||||||||||||NEED TO EDIT||||||||||||||||||| --------
      • -------- this enables/disables camera lock for certain players, the number is the player number, add these wherever you wish in your map --------
      • Set Player_CamLock[1] = True
      • Set Player_CamLock[2] = True
      • Set Player_CamLock[3] = True
      • Set Player_CamLock[4] = True
      • Set Player_CamLock[5] = True
      • Set Player_CamLock[6] = True
      • Set Player_CamLock[7] = True
      • Set Player_CamLock[8] = True
      • Set Player_CamLock[9] = True
      • Set Player_CamLock[10] = True
      • Set Player_CamLock[11] = True
      • Set Player_CamLock[12] = True
      • -------- this sets the unit you want to lock a certain players camera to, add these wherever you wish in your map --------
      • Set Player_Unit[1] = Soldier (woot) 0108 <gen>
      • Set Player_Unit[2] = Soldier (woot) 0005 <gen>
      • Set Player_Unit[3] = Soldier (woot) 0007 <gen>
      • Set Player_Unit[4] = Soldier (woot) 0006 <gen>
      • Set Player_Unit[5] = Soldier (woot) 0010 <gen>
      • Set Player_Unit[6] = Soldier (woot) 0011 <gen>
  • Camera Lock
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set TEMP_PlayerGroup[1] = (All players matching (((Matching player) slot status) Equal to Is playing))
      • Player Group - Pick every player in TEMP_PlayerGroup[1] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_CamLock[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Camera_Rotation_Mode[(Player number of (Picked player))] Equal to 0
                • Then - Actions
                  • Camera - Set (Picked player)'s camera Rotation to (Facing of Player_Unit[(Player number of (Picked player))]) over Rot_Locked_FollowSpeed seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Camera_Rotation_Mode[(Player number of (Picked player))] Equal to 1
                    • Then - Actions
                      • Camera - Set (Picked player)'s camera Rotation to Camera_Rotation[(Player number of (Picked player))] over Rot_Unlocked_FollowSpeed seconds
                    • Else - Actions
                      • Do nothing
              • Camera - Set (Picked player)'s camera Distance to target to (Dis_Min + Camera_Distance[(Player number of (Picked player))]) over Dis_FollowSpeed seconds
              • Camera - Set (Picked player)'s camera Angle of attack to (AoA_Min + Camera_AngleofAttack[(Player number of (Picked player))]) over AoA_FollowSpeed seconds
              • Camera - Set (Picked player)'s camera Height Offset to (Hgt_Min + Camera_Height[(Player number of (Picked player))]) over Hgt_FollowSpeed seconds
              • Set TEMP_Point[1] = (Position of Player_Unit[(Player number of (Picked player))])
              • Camera - Pan camera for (Picked player) to TEMP_Point[1] over Cam_FollowSpeed seconds
              • Custom script: call RemoveLocation(udg_TEMP_Point[1])
            • Else - Actions
              • Do nothing
      • Custom script: call DestroyForce (udg_TEMP_PlayerGroup[1])
  • Rotation Lock Toggle
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
    • Actions
      • Game - Display to (All players) the text: <Empty String>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Camera_Rotation_Mode[(Player number of (Triggering player))] Equal to 0
          • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
          • Camera_RotLock_Selection[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Set Camera_Rotation[(Player number of (Triggering player))] = (Facing of Player_Unit[(Player number of (Triggering player))])
          • Set Camera_Rotation_Mode[(Player number of (Triggering player))] = 1
          • Floating Text - Create floating text that reads Camera Rotation Unl... above (Triggering unit) with Z offset 7.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Camera_Rotation_Mode[(Player number of (Triggering player))] Equal to 1
              • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
              • Camera_RotLock_Selection[(Player number of (Triggering player))] Equal to True
            • Then - Actions
              • Set Camera_Rotation_Mode[(Player number of (Triggering player))] = 0
              • Floating Text - Create floating text that reads Camera Rotation Loc... above (Triggering unit) with Z offset 7.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Player_Unit[(Player number of (Triggering player))]
        • Then - Actions
          • Set Camera_RotLock_Selection[(Player number of (Triggering player))] = True
        • Else - Actions
          • Set Camera_RotLock_Selection[(Player number of (Triggering player))] = False
Thanks! :)

just create another trigger that sets the loaded character into the variable where the camera locks.
 
Status
Not open for further replies.
Top