• 🏆 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] Locked cameras

Status
Not open for further replies.
Level 10
Joined
Jul 10, 2004
Messages
595
Once again, ive been trying to get this done myself but i cant figure it out. I need triggers that lock the camera when a unit enters a region, and the player is not able to zoom out while its locked. Now I have the locked camera part, but I dont know how to make it so it stays lock even when the player presses the keys to zoom out from that camera, also, I need it so it works for every player.
Thanks in advance
 
Level 9
Joined
May 27, 2006
Messages
498
  • Camera
    • Events:
      • Time - Every 0.04 seconds of game time
    • Conditions:
    • Actions:
      • Player Group - Pick every player in (all players) and do:
        • Camera - Lock target camera to [point]
        • Camera - set camera as necessary to Angle of [already placed camera]
        • Camera - set camera as necessary to Height of [already placed camera]
        • Camera - set camera as necessary to... etc etc
This should work.
 
Level 10
Joined
Jul 10, 2004
Messages
595
Thats what i figured but the problem is that it can be different camers, for example, in my map instead of the normal camera players use where they can look around, they have a single unit, and as they enter regions the camera view changes, so if players are in different spots thats a different camera for every player, the way you gave me would mean every player would see the same spot

=/
 
Level 9
Joined
May 27, 2006
Messages
498
Then u'd have to do triggers for every place where camera changes and arrayed variables for every player. For example:

  • Change
    • Events:
      • Unit - A unit enter Region 001 <gen>
    • Conditions:
    • Actions:
      • Set CameraAngle[(Player number(Owner of(Triggering unit)))] = [value]
      • Set CameraHeight[(Player number(Owner of(Triggering unit)))] = [value]
      • etc etc

And then the trigger i already wrote, but a little changed:

  • Camera
    • Events:
      • Time - Every 0.04 seconds of game time
    • Conditions:
    • Actions:
      • For each (Integer A) from 1 to [max number of players] do:
        • Set TempPoint = (Position of (PlayerHero[(Integer A)]))
        • Camera - Lock target camera to Temp Point
        • Custom script: call RemoveLocation( udg_TempPoint )
        • Camera - set camera as necessary Angle to CameraAngle[(Integer A)]
        • Camera - set camera as necessary Height to CameraHeight[(Integer A)]
        • Camera - set camera as necessary to... etc etc

Of course you'll have to use arrayed variables, there is no other way to do this in GUI...
 
Level 6
Joined
Feb 12, 2008
Messages
207
humm sorry, but try not to use several cameras as they generally bug maps and you get critical errors... i would recommend to use them the least possible... good triggering!
 
Level 9
Joined
Oct 24, 2007
Messages
421
.04 periodic camera triggers can really slow down maps in multi. If it's in solo the method described is fine. I'm guessing your trying to create a 'resident evil' style locked camera as was used in 'zombie island', this sites first custom map. It only worked then because zombie island was, well, solo.

You can try to get this to work, but in the end you'll probably find it causes slowdown/lag.
 
Status
Not open for further replies.
Top