• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

A camera restriction question

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 017
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Region_Reals[0] = (Min X of Region 002 <gen>)
      • Set Region_Reals[1] = (Min Y of Region 002 <gen>)
      • Set Region_Reals[2] = (Max X of Region 002 <gen>)
      • Set Region_Reals[3] = (Max Y of Region 002 <gen>)
  • Untitled Trigger 016
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set real1 = (Target X of current camera view)
      • Set real2 = (Target Y of current camera view)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • real1 Greater than or equal to Region_Reals[0]
          • real2 Greater than or equal to Region_Reals[1]
          • real1 Less than or equal to Region_Reals[2]
          • real2 Less than or equal to Region_Reals[3]
        • Then - Actions
        • Else - Actions
          • Set Temp_Point = (Center of Region 002 <gen>)
          • Camera - Pan camera as necessary for Player 1 (Red) to Temp_Point over 0.50 seconds
          • Custom script: call RemoveLocation(udg_Temp_Point)
Panning to center of region might be a bit crude method, you might want to pan to some offset point of the current camera target, or separate the comparisons and pan to max/min value as necessary. And maybe loop the trigger for all players needed.
 
Level 15
Joined
Nov 26, 2005
Messages
1,151
Ok, that's something, but what I meant was like in ... Pyramid escpae or other minigames, u know? Each game is restricted in it's own region and you can't move the camera outside the region :?

Is there a way for that?

Otherwise, 10x + rep!
 
Status
Not open for further replies.
Top