• 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.

[Solved] Returning camera heightZ of certain player

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
You cant.
You can only load the settings of one's camera on a local client.

So, when running this function, it might return a different value for you as it does for me.
You can however, keep track of what values it has been set to... but that is something else and not always useful.
 
It depends on what you want to do with it. If you simply want to do something visual, chances are you can just put it in a local block and run the action locally, e.g.
JASS:
if GetLocalPlayer() == Player(0) then
    // do stuff with GetCameraTargetPositionZ()
endif

If you really need to perform something globally, then you may want to synchronize the player's camera data between players, like so:
ObserverMode and PlayerCameraData

Again, it depends on what you need to do. If you choose the synchronization option, then you'll have to tolerate delays (expect ~250-500 ms delays on battle.net). If you choose the local option, you can get it instantly, but you can only do local-safe stuff. For more info on GetLocalPlayer(), check this thread out:
JASS: GetLocalPlayer() | The Helper
 
Status
Not open for further replies.
Top