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

Camera Locking

Status
Not open for further replies.
Level 2
Joined
Dec 11, 2010
Messages
11
Hey, I'm looking to lock the camera onto a unit (I know how to do that) but I want it to stay exactly locked on so that even if the unit walks up a hill he would not go out the camera bounds at top of screen he would just stay centered and normal
 
Level 2
Joined
Dec 11, 2010
Messages
11
Yes that's exactly what I was referring to, the problem is if he walks up a hill (not a cliff) the unit isn't centered anymore and since I have some pretty extreme hills on my map the unit will actually walk off the screen even if it's still locked on
 
Okay, I see. You can use LocationZ of position of unit, and then add 1650 (default hight)
  • Trigger
    • Ereignisse
      • Time - Every 0.10 seconds of game time
    • Bedingungen
    • Aktionen
      • Set Point = (Position of Unit)
      • Custom script: set udg_Real = GetLocationZ(udg_Point)
      • Kamera - Set Player 1 (Red)'s camera Distance to Target to (Real + 1650.00) over 0.10 seconds
      • Custom script: call RemoveLocation udg_point
Note: You would have to create a variable of type real named "Real". And perhaps also the Point variable if you dont have activated "automatcally create unknown variables"
 
Level 2
Joined
Dec 11, 2010
Messages
11
Alright so I've been trying to use both of your guys camera systems but I've never dealt with JASS before I just need to know what I either
A. replace the whole (player) thing with or
B. just how to hook it up with a unit

Btw, thank you everybody for being so helpful I really didn't expect it

EDIT: Nvm just read this http://www.hiveworkshop.com/forums/1982713-post207.html made everything clear
 
Level 2
Joined
Dec 11, 2010
Messages
11
Maker I was wondering if it's possible for the camera to not follow the units facing angle

With my system you don't replace anything download the test map the stuff is in GUI there. Read the notes in the JASS script it shows how to use each function in the form of custom script.

Alright so I want to make it so that

unit enters a region

player who owns the unit will then be camera locked onto that unit
 
Last edited by a moderator:
Status
Not open for further replies.
Top