• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

3rd person camera

Status
Not open for further replies.
Level 10
Joined
Sep 21, 2007
Messages
517
simple my friend, leme show u the process: (from my system):
1. set your units to be used in first person in variables, each in a systematic order, like this order: 1,2,3,4,5,6,7... etc, but not 1, 3, 10 or something like that.
  • Set CameraLocknits[1] = Paladin 0000 <gen>
  • Set CameraLocknits[2] = Mountain King 0002 <gen>
2. now create a camera in the camera pallette, mess with the values until you get the look required.
3. now set a camera variable = to that camera you created in the camera pallette
  • Set FirstPerson = FirstPersonValues <gen>
4. now create an integer variable setting the maximum number of units used in this "camera system"
  • Set MaxNumCamUnit = 2
5. now do for each integer a from integer 1 to maxium number of units used in this camera system, change the camera values of the owner of the cameraunit[integer a] to the camera values of your camera that was set in a variable.
  • For each (Integer A) from 1 to MaxNumCamUnit, do (Actions)
    • Loop - Actions
      • Camera - Lock camera target for (Owner of CameraLocknits[(Integer A)]) to CameraLocknits[(Integer A)], offset by (0.00, 0.00) using The unit's rotation
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Distance to target to (Distance to target of FirstPerson) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Far Z to (Far Z of FirstPerson) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Angle of attack to (Angle of attack of FirstPerson) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Field of view to (Field of view of FirstPerson) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Roll to (Roll of FirstPerson) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Rotation to (Facing of CameraLocknits[(Integer A)]) over 0.00 seconds
      • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Height Offset to (Height Offset of FirstPerson) over 0.00 seconds
6. now for the periodic events, i have made it as lagless and practical as possible:
for every 1 second, you must do this loop again to make sure that the players have their camera values to third person again.
  • CameraCheck
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to MaxNumCamUnit, do (Actions)
        • Loop - Actions
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Distance to target to (Distance to target of FirstPerson) over 0.00 seconds
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Far Z to (Far Z of FirstPerson) over 0.00 seconds
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Angle of attack to (Angle of attack of FirstPerson) over 0.00 seconds
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Field of view to (Field of view of FirstPerson) over 0.00 seconds
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Roll to (Roll of FirstPerson) over 0.00 seconds
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Height Offset to (Height Offset of FirstPerson) over 0.00 seconds
7. Now since the unit always rotates and the player almost never changes his camera values, you must make a low time for the rotation of the unit, here is what to do:
  • CameraRotate
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to MaxNumCamUnit, do (Actions)
        • Loop - Actions
          • Camera - Set (Owner of CameraLocknits[(Integer A)])'s camera Rotation to (Facing of CameraLocknits[(Integer A)]) over 0.00 seconds
Please note: the periodic time for the rotation of the unit is so the rotation can appear more realistic, you may increase it or decrease it as u like.
Also note: you need to set the camera of the player to normal after his camera unit dies.
 
Status
Not open for further replies.
Top