HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Change start camera position problem

05-15-2009, 03:57 PM#1
Vervekke
Hi all,

In some way I can't change the start camera position in my map. I want to let the camera start at the location of my hero and not the keep. Does anyone have an idea how I can solve this.

Cheers.
05-15-2009, 04:43 PM#2
Rising_Dusk
Delete the trigger "Melee Initialization." If you still want the game to be melee, you should only delete the action inside of it corresponding to the camera. If you want it to focus on your hero, do a SetCameraPosition like follows in an initialization trigger.
Collapse JASS:
if GetLocalPlayer() == MyPlayer then
    call SetCameraPosition(GetUnitX(MyHero), GetUnitY(MyHero))
endif
05-15-2009, 04:46 PM#3
Alevice
Or just change it afterwards, when elapsed game time is 0.0 seconds.
05-15-2009, 04:50 PM#4
Michael Peppers
If I'm right the camera position at the init is controlled by the action "Melee (or Assault, I don't know how it's called) - Create Starting Units (for all players)".

Recreate that for your player (or players, in case of a multiplayer map) and use this for the AI players:
Trigger:
Player Group - Pick Every Player in (Player Matching ((Player Controller) Equal to Computer)) And Do (Actions)
Collapse Loop - Actions
Melee - Create (Picked Player) Starting Units
then you should use the action to move the camera:

Trigger:
Camera - Pan Camera blablabla

And it should work. If it doesn't, I'd have to check how I done that in my maps.

Another thing... sorry if the Action names are wrong (probably), but I can't control that by myself now.

Edited because: 2 posts after mine, .
05-15-2009, 10:01 PM#5
Vervekke
Excellent, I used the camera pan action and selected my unit.

Camera - Pan camera for Player 1 (Red) to (Position of Hero 0000 <gen>) over 0.00 seconds


THNX ALL