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

Arrow Keys Camera Hero Selection

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
192
As my elaborately named title hints at; I am trying to create a system where the Player (there is only one) uses the Arrow Keys (left and right) to scroll through selectable Heroes.
The three selectable Heroes have their own Cameras (HeroFrontCamera 1-3), which the player can cycle through using the arrow keys.
The Heroes are placed, from left to right, as 1... 2... 3 (HeroCamPos 1-3)

The problem here is that using the Arrow Keys will also cause the Camera to move about, which I'd like to avoid.
Disabling User Control (with Cinematic-triggers) won't do, because that also makes players unable to press the Arrow Keys (the trigger won't respond to key presses when User Control is Disabled).
I also tried locking camera bounds to the hero units or regions in their area, but the cameras can still be moved about a little bit, which is frustrating.

Any advice? (My triggers follow below, in the spoilers)

  • Initial Camera Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Sets up the initial User-Control limitations --------
      • Camera - Set the camera bounds for Player 1 (Red) to Hero1 Exact Position <gen>
      • Cinematic - Turn subtitle display override On
      • Game - Disable selection and deselection functionality (Disable selection circles)
      • Selection - Select Selector (Dummy) 0008 <gen>
      • -------- Sets up initial camera position and visibility --------
      • Set HeroCamPos = 1
      • Camera - Apply Hero1 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across HeroSelection General Area <gen>
  • Move Left
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 1
        • Then - Actions
          • -------- HeroCamPos = 1 is the leftmost camera positon, and the camera will skip to rightmost camera (to HeroCamPos = 3) --------
          • Camera - Apply Hero3 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 3
          • -------- Plays a sound depending on Hero - HeroCamPos 3 is Beastmaster --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 2
        • Then - Actions
          • -------- HeroCamPos = 2 is the middle camera positon, and the camera will move left (to HeroCamPos = 1) --------
          • Camera - Apply Hero1 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 1
          • -------- Plays a sound depending on Hero - HeroCamPos 1 is ORCISH --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 3
        • Then - Actions
          • -------- HeroCamPos = 3 is the rightmost camera position, and the camera will move left (to HeroCamPos = 2) --------
          • Camera - Apply Hero1 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 2
          • -------- Plays a sound depending on Hero - HeroCamPos 2 is ICY --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
  • Move Right
    • Events
      • Player - Player 1 (Red) Presses the Right Arrow key
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 1
        • Then - Actions
          • -------- HeroCamPos = 1 is the leftmost camera positon, and the camera will move right (to HeroCamPos = 2) --------
          • Camera - Apply Hero2 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 2
          • -------- Plays a sound depending on Hero - HeroCamPos 2 is ICY --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 2
        • Then - Actions
          • -------- HeroCamPos = 2 is the middle camera positon, and the camera will move right (to HeroCamPos = 3) --------
          • Camera - Apply Hero3 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 3
          • -------- Plays a sound depending on Hero - HeroCamPos 3 is Beastmaster --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroCamPos Equal to 3
        • Then - Actions
          • -------- HeroCamPos = 3 is the rightmost camera position, and the camera will skip to leftmost (to HeroCamPos = 1) --------
          • Camera - Apply Hero1 FrontCam <gen> for Player 1 (Red) over 0.00 seconds
          • Set HeroCamPos = 1
          • -------- Plays a sound depending on Hero - HeroCamPos 1 is ORCISH --------
          • Sound - Play IHearTheCallOfTheWild <gen>
          • Sound - Destroy (Last played sound)
        • Else - Actions
 
Level 7
Joined
May 15, 2009
Messages
192
(Almost) Exactly like that, thanks. All I had to change was just me using Camera Objects instead of focusing on units. Thanks a lot of the help, I should've thought of just forcing the camera through with a loop as well...

+rep, much appreciated.
 
Status
Not open for further replies.
Top