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

[Trigger] First person view

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I ve got another trigger started where they type a command; It looks like this:
  • Events
    • Player - Player X (color) types -obs as an exact match
  • Conditions
    • (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 1
  • Actions
    • ------------ Need first person view for the hero ----------
    • Wait 50 seconds
    • ------------ Need to return to original view (topographical?) ---------
 
Well here are some commands that would make the camera follow the unit but im not so sure how to make it go down..

  • Actions
    • Camera - Apply (Current camera) for Player X (Color) over 0.00 seconds
    • Camera - Lock camera target for Player X (Color) to (Hero), offset by (50.00, 180.00) using Default rotation
    • Wait 50.00 seconds
    • Camera - Stop the camera for Player X (color)
 
Level 12
Joined
Aug 22, 2008
Messages
911
Chief-Oblivion's solution simply locks the camera to the hero (and btw, the first command is pointless), if you roll the wheel button on the mouse it will modify the camera.
I think CrueIIntentions' intention is to lock the camera so that it won't even change angles.
 
Level 9
Joined
Jun 7, 2008
Messages
440
Correct. I want to lock it onto 1st person view, so that whatever the hero sees, the player sees as well. And thats it. i have another trigger in place, so that when i figure the first part out, i can return it to the original camera.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
You could download a 3rd person camera system like RolePlaynGamer posted on this site and set it to totally zoomed in.
There's a command on that system that enables the camera for in this case the only hero owned by the player that types -obs.
You could set the minimum and max zoom value to something very high so its always totally zoomed in.
 
Level 9
Joined
Jun 7, 2008
Messages
440
You could download a 3rd person camera system like RolePlaynGamer posted on this site and set it to totally zoomed in.
There's a command on that system that enables the camera for in this case the only hero owned by the player that types -obs.
You could set the minimum and max zoom value to something very high so its always totally zoomed in.

Do you know any maps offhand that would do this? would be nice to have for my map too.

@vegavak okay thanks alot. it's good.
 
Level 8
Joined
Aug 4, 2006
Messages
357
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set hero[1] = Player 1's hero <gen>
      • Set hero[2] = Player 2's hero <gen>
      • Set hero[3] = Player 3's hero <gen>
  • first person cam setup
    • Events
      • Player - Player 1 (Red) types a chat message containing -cam 1st as An exact match
      • Player - Player 2 (Blue) types a chat message containing -cam 1st as An exact match
      • Player - Player 3 (Teal) types a chat message containing -cam 1st as An exact match
    • Conditions
    • Actions
      • Set cameraTarget[(Player number of (Triggering player))] = ((Position of hero[(Player number of (Triggering player))]) offset by 45.00 towards (Facing of hero[(Player number of (Triggering player))]) degrees)
      • Camera - Pan camera for (Triggering player) to cameraTarget[(Player number of (Triggering player))] over 2.00 seconds
      • Camera - Set (Triggering player)'s camera Distance to target to (Distance to target of firstPersonCam <gen>) over 2.00 seconds
      • Camera - Set (Triggering player)'s camera Angle of attack to (Angle of attack of firstPersonCam <gen>) over 2.00 seconds
      • Camera - Set (Triggering player)'s camera Height Offset to (Height Offset of firstPersonCam <gen>) over 2.00 seconds
      • Camera - Set (Triggering player)'s camera Rotation to (Facing of hero[(Player number of (Triggering player))]) over 2.00 seconds
      • Wait 2.00 seconds
      • Player Group - Add (Triggering player) to firstCamPlayers
      • Custom script: call RemoveLocation(udg_cameraTarget[GetConvertedPlayerId(GetTriggerPlayer())])
      • Wait 48.00 seconds
      • Player Group - Remove (Triggering player) from firstCamPlayers
      • Set cameraTarget[(Player number of (Triggering player))] = (Position of hero[(Player number of (Triggering player))])
      • Camera - Pan camera for (Triggering player) to cameraTarget[(Player number of (Triggering player))] over 2.00 seconds
      • Camera - Reset camera for (Triggering player) to standard game-view over 2.00 seconds
      • Wait 2.00 seconds
      • Custom script: call RemoveLocation(udg_cameraTarget[GetConvertedPlayerId(GetTriggerPlayer())])
  • first person cam periodic
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (Number of players in firstCamPlayers) Greater than 0
    • Actions
      • Player Group - Pick every player in firstCamPlayers and do (Actions)
        • Loop - Actions
          • Set cameraTarget[(Player number of (Picked player))] = ((Position of hero[(Player number of (Picked player))]) offset by 45.00 towards (Facing of hero[(Player number of (Picked player))]) degrees)
          • Camera - Pan camera for (Picked player) to cameraTarget[(Player number of (Picked player))] over 0.03 seconds
          • Camera - Set (Picked player)'s camera Rotation to (Facing of hero[(Player number of (Picked player))]) over 0.03 seconds
          • Custom script: call RemoveLocation(udg_cameraTarget[GetConvertedPlayerId(GetEnumPlayer())])
try this on for size. (Note: i only made the triggers with 3 players, but you should include however many you need). variables you need are:
"hero" - an array of units, having a size = to number of players, to store each player's hero.
"cameraTarget" - a point array, size = num players.
"firstCamPlayers" - a player group to store the players currently using a first person camera view.

last thing you need is a camera object ("firstPersonCam"). my camera had:

Z Offset - 90
Angle of Attack - 349
Distance - 100 (minimum)

feel free to change the "cameraTarget" offset if 45 makes you see through the model. I found it just perfect to let me see the claws of my orc shaman while running and attacking. you may also need to change the Z Offset if your unit's head is at a different height than the shaman i was using.
 
Status
Not open for further replies.
Top