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

Fixed View (Camera)

Status
Not open for further replies.
Level 8
Joined
Mar 26, 2009
Messages
301
How do we focus camera to a certain point indefinitely? Player should not be able to move it in any way; so we are forcing player to view a certain part of map during game.
And when game camera is rotated to 270 degrees; units look darker (from that side =) ) Is there a way to light the environment so they wont look so dark? =)
 
  • Trigger
  • Events
    • Time - Every 0.05 seconds of game-time
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Player((Integer A))) controller) Equal to User
            • ((Player((Integer A))) slot status) Equal to Is playing
          • Then - Actions
            • Set Point1 = (Center of (Playable Map Area))
            • Camera - Pan camera for (Player(IntegerA)) to Point1 over 0.00 seconds
            • Camera - Set (Player((Integer A)))'s camera Angle of attack to 304.00 over 0.00 seconds
            • Camera - Set (Player((Integer A)))'s camera Distance to target to 1650.00 over 0.00 seconds
            • Custom script: call RemoveLocation (udg_Point1)
The values I placed there are related to the default game camera's settings.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I would pick another, better method (sorry Pharaoh_).

With Pharaoh's method, the players can still move the camera, it will just shock back to it's initial position.
However, if you create a dummy unit (not visible, no shadow, no food cost, no attack, abilities: locust and invulnerable neutral) and lock the camera to that unit, then the camera will not be able to change whatsoever.

Aside from that, it only needs to run once, so it won't drain CPU usage by running every 0.05 seconds.

  • Actions
    • Set TempLoc = (Center of (Playable map area))
    • Unit - Create 1 Camera Dummy for Player 1 (Red) at TempLoc facing 0.00 degrees
    • For each (Integer LoopInt) from 1 to 10, do (Actions)
      • Loop - Actions
        • Camera - Lock camera target for (Player(LoopInt)) to (Last created unit), offset by (0.00, 0.00) using Default rotation
    • Custom script: call RemoveLocation(udg_TempLoc)
Note: every time you apply a new camera, you will need to relock the camera, so you might want to make the "Camera Dummy" a unit variable.



About the light problem: you can change the default warcraft lighing, but I did not test this yet.
If you use xdep on your map, you will get a few text-files called "war3mapMisc.txt" and "war3mapSkin.txt" (and maybe "war3mapExtra.txt").
Open up war3mapMisc.txt and insert this line at the bottom:
Code:
[Light]
// Vector from light to world
Direction=0.3,0.3,-0.25
Save this file and import it in your map (under the exact same name, "war3mapMisc.txt")!

You can change the "Direction=...." to fit your settings, the line I've given is the default one.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I already did camera like you said above. But I need help with "xdep" thing; I've searched forum titles but came across nothing useful. What is xdep for instance? =)
Umm, xdep is a russian de-protection tool (not really allowed on the hive :/).
I usually use it just to get the files from a map or check the triggers of someone (to help him, don't get me wrong here :p).

There are probably other tools you can use as well, I'm going to search for one now...
 
Status
Not open for further replies.
Top