• 🏆 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!

How to change camera height pernamently?

Status
Not open for further replies.
Level 4
Joined
Jun 15, 2010
Messages
67
When I use the trigger to change camera height it's only until I click on minimap or move my scroll on mouse. I hope there's a better option (probably in JASS) to change height of the camera pernamenlty. I want to call it by command (for example "-camera 1000" or something like this, really doesn't matter).
 
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • Trigger - Add to Two <gen> the event (Player - (Player((Integer A))) types a chat message containing -height as A substring)
  • Two
    • Events
    • Conditions
      • (Substring((Entered chat string), 1, 7)) Equal to -height
    • Actions
      • Player Group - Add (Triggering player) to CameraGroup
      • Set Value[(Player number of (Triggering player))] = (Real((Substring((Entered chat string), 9, (Length of (Entered chat string))))))
      • Trigger - Turn on Three <gen>
  • Three
    • Events
      • Time - Every 0.08 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in CameraGroup) Not equal to 0
        • Then - Actions
          • Player Group - Pick every player in CameraGroup and do (Actions)
            • Loop - Actions
              • Camera - Set (Picked player)'s camera Distance to target to Value[(Player number of (Picked player))] over 0.00 seconds
        • Else - Actions
          • Trigger - Turn off (This trigger)
Value[] is a real variable with Array ticked, CameraGroup is a PlayerGroup variable.
 
Status
Not open for further replies.
Top