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

Camera Question

Status
Not open for further replies.
Level 54
Joined
Dec 8, 2008
Messages
4,377
Soo:

The normal cam is like that

attachment.php


but I want it to be like that:

attachment.php


so an exact birdview camera. maybe somebody can tell me how I can make that? the complicated thing is, that it should follow the unit when it moves (like the normal cam trigger lock camera target at unit, just with that birdview)

+rep for shure :)
 

Attachments

  • Camexample.JPG
    Camexample.JPG
    452.6 KB · Views: 129
  • Camexample2.JPG
    Camexample2.JPG
    449.2 KB · Views: 148
Wait, lemme get this straight, you want a birdeye view cam, which locks to a selected unit? or is free to move? or when u click a unit portrait the cam follows it?

for the second and third you simply make a cam object at set the Angle of attack to 270, then use a trigger to apply the cam after so many seconds, the second is tricker but still simple, if u wanted the frist one just say and I'll show you how.
 
  • Cam Target set
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
    • Actions
      • Set Cam_Lock[(Player number of (Triggering player))] = (Triggering unit)
      • Camera - Apply Cam <gen> for (Triggering player) over 0.00 seconds
  • Constant lock
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Lock camera target for (Picked player) to Cam_Lock[(Player number of (Triggering player))], offset by (0.00, 0.00) using Default rotation
That should just about do it.
Make sure you create a camera object with an Angle of attack of 270 tho :P
 
You don't need a preset camera. Plus, in the periodic trigger, you also need to set the angle of attack, so that the player can't scroll with the mouse wheel. Here:
  • One
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)
      • -------- ------------------------ --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Two <gen> the event (Player - (Player((Integer A))) Selects a unit)
  • Two
    • Events
    • Conditions
    • Actions
      • Hashtable - Save (Distance to target of the current camera view) as (Key distance) of (Key (Triggering player)) in Hashtable
      • Hashtable - Save Handle Of(Triggering unit) as (Key hero) of (Key (Triggering player)) in Hashtable
      • Player Group - Add (Triggering player) to CameraGroup
      • Trigger - Turn on Three <gen>
  • Three
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in CameraGroup) Not equal to 0
        • Then - Actions
          • Player Group - Pick every player in CameraGroup and do (Actions)
            • Loop - Actions
              • Set Distance = (Load (Key distance) of (Key (Picked player)) from Hashtable)
              • Set Hero = (Load (Key hero) of (Key (Picked player)) in Hashtable)
              • Camera - Lock camera target for (Picked player) to Hero, offset by (0.00, 0.00) using Default rotation
              • Camera - Set (Picked player)'s camera Angle of attack to 270.00 over 0.00 seconds
              • Camera - Set (Picked player)'s camera Distance to target to Distance over 0.00 seconds
        • Else - Actions
          • Trigger - Turn off (This trigger)
Trigger "Three" is not initially enabled.

No offence intended, Tank-Commander.
 
Status
Not open for further replies.
Back
Top