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

Moving Cameras - Key Press

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
I would like to do a map that uses key presses during the hero selection part to scroll through camera's what is a basic trigger for doing this? so the player can view the hero types?

Player - Player 1 (Red) Presses the Left Arrow key
 
what i meant was how do i go from camera 1 ->2 ->3->1 etc by pressing the left/right key and scrolling through
 
it seems to be easy you can create variables type of Camera object then set them and next create a trigger with
  • Player - Player 1 (Red) Presses the Left Arrow key
event finally if you already in Camera object 1 then switch you to Camera object 2
 
Enable Player control when in Letterbox mode

Set CamInteg = 1

Set Cam[1] = Cam 1
Set Cam[2] = Cam 2
Set Cam[3] = Cam 3

If Keyboard Event Up = Caminteg = Caminteg + 1
If Keyboard Event Down = Caminteg = Caminteg - 1

Trigger2:
Every 0.20 sek.

Apply Cam[Caminteg] for Player 1

...
 
could someone create a sample map, im mainly stuck on the array side of things. I can change camera pressing different buttons just not scroll through the same cameras
 
Use a state machine with edges being triggered by the keyboard arrow events.

When in a state the camera behaves in a certain way. This is usually done by disabling the systems of the other camera states and turning on the system of the camera state you have just changed to.

Unlike VHDL where all statements in a process are performed instantaneously, JASS executes statements sequentially so it is very inefficient to reset all state logic at the start of a state transition event. You should instead model each edge of the state machine as a separate case making sure to change only the necessary to go from one state to another. Especially if one of the state edges requires changing of settings of a single camera system it can save on re-loading the entire system.
 
Status
Not open for further replies.
Back
Top