• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Following Camera in height differences

Status
Not open for further replies.
Level 2
Joined
Aug 29, 2013
Messages
13
Hi Guys!
I need a trig allows camera follow the height differences of a unit. The problem born when my unit go on a higth walkable doodle like a tower, for the game is in the same level and the camera don't up.
Thanks a lot! :)
 
Thanks very much
but i don't have jass knoledge.
I have paste jass script but when i test, game don't le me start the map.
Could you show me a example of "camera heigth " as variable?
Please :)
 
use custom scripts. One custom script per line and then put the action Wiet gave you just bellow it.

This is just about as GUI friendly as I can go. Just add an event and change the variable.
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Custom script: local unit u
      • Custom script: local location l
      • Custom script: local real z
      • Custom script: local real fly
      • Set your_unit = (Triggering unit)
      • Custom script: set u = udg_your_unit
      • Custom script: set l = GetUnitLoc(u)
      • Custom script: set z= GetLocationZ(l)
      • Custom script: set fly = GetUnitFlyHeight(u)
      • Custom script: call SetCameraFieldForPlayer(Player(0), CAMERA_FIELD_ZOFFSET, z + fly, 1 )
 
For the first think thanks for the availability. ^_^
My unit is a Mur'loc, and i need to be amphibious, I don't want he walk on a tree...
 
If you want to be able to set the camera height to the exact height (or relative height) of the terrain, you will, apart from GetLocationZ(), also need a system that Bob666 made some time ago. Basically, warcraft uses some kind of weird interpolations to make the camera move smoothly across uneven terrain. What his system does is generate a camera map, which allows you to get the relative camera offset using a single function (if i remember correctly, it is simply called GetCameraZOffset). I don't have a link, but i know you can find it inside his FlightSim map.
 
Status
Not open for further replies.
Back
Top