| 09-02-2009, 11:58 AM | #1 |
Hi, i managed to make a 3rd camera view wich goes up and down when the unit is going up or down with it, i am using this jass script to disable the auto z movement, and just place it at the height i wish, as you can see: JASS:function SetCameraZ takes real z returns nothing set z = GetCameraField(CAMERA_FIELD_ZOFFSET)+z-GetCameraTargetPositionZ() call SetCameraField(CAMERA_FIELD_ZOFFSET,z,- 0.01) call SetCameraField(CAMERA_FIELD_ZOFFSET,z,0.01) endfunction Trigger: Custom script: call SetCameraZ (udg_CameraHeight)now the problem i can't set different players different Z heights, how can i change it so it will work with different z for different players, let's say the Variable Z will be with 6 arrays, named CameraZ[1~6]. |
| 09-02-2009, 12:20 PM | #2 |
JASS:if GetLocalPlayer() == YourPlayer then call SetCameraZ(height) endif |
| 09-02-2009, 12:34 PM | #3 |
huh? i don't know jass ^^ i copied this script from someone else |
| 09-02-2009, 12:45 PM | #4 |
New code: JASS:function SetCameraZ takes real z, player p returns nothing if GetLocalPlayer() == p then set z = GetCameraField(CAMERA_FIELD_ZOFFSET)+z-GetCameraTargetPositionZ() call SetCameraField(CAMERA_FIELD_ZOFFSET,z,- 0.01) call SetCameraField(CAMERA_FIELD_ZOFFSET,z,0.01) endif endfunction Trigger: Custom script: call SetCameraZ (udg_CameraHeight, Player(0)) |
| 09-02-2009, 01:38 PM | #5 |
Thx! it works :D |
