• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Selection System - Need help!

Status
Not open for further replies.
In my project Terranism, i have developed a high quality selection system, but it doesnt fully work. It should be like that there is a colection of 3 hero units. When pressing LEFT/RIGHT you change between the cameras that is pointed at the current hero in a matching terrain that pleasures the eyes.
The problem is that when you press LEFT it changes from hero 1 to 2 and when you then press LEFT again it swaps back to hero 1.
RIGHT arrow doesnt work on either hero 1 and 2 and its not even possible to see hero 3.
Can anybody out there find out what i have done wrong?

  • SelectionSetup
    • Events
      • Timer - Elapsed time is 0.0 Game Time seconds
    • Local Variables
    • Conditions
    • Actions
      • UI - Display "You have 45 seconds to choose a tyr..." for (Player group(7)) to Subtitle area
      • UI - Display "You have 45 seconds to choose a tyr..." for (Player group(8)) to Subtitle area
      • Camera - Lock camera input for player 7
      • Camera - Lock camera input for player 8
      • Variable - Set SelectionCurrent[1] = 1
      • Variable - Set SelectionCurrent[2] = 1
      • Camera - Apply PsionicTyran for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
      • Camera - Apply PsionicTyran for player 8 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
      • UI - Hide game UI for (Player group(7))
      • UI - Hide game UI for (Player group(8))
      • Dialog - Create a Modal dialog of size (400, 600) at (0, 0) relative to Right of screen
      • Variable - Set SelectionInfo[1] = (Last created dialog)
      • Dialog - Create a Modal dialog of size (400, 600) at (0, 0) relative to Right of screen
      • Variable - Set SelectionInfo[2] = (Last created dialog)
      • Dialog - Create a Modal dialog of size (400, 600) at (0, 0) relative to Right of screen
      • Variable - Set SelectionInfo[3] = (Last created dialog)
      • Dialog - Show SelectionInfo[1] for (Enemies of player 1)
      • Dialog - Create a label for dialog SelectionInfo[1] with the dimensions (350, 50) anchored to Top with an offset of (100, 50) with the text "Psionic Tyran" color set to Light Blue text writeout set to false with a writeout duration of 2.0
      • Dialog - Create a label for dialog SelectionInfo[1] with the dimensions (350, 400) anchored to Top with an offset of (0, 150) with the text "Strong electric tyran. Has unknown ..." color set to White text writeout set to true with a writeout duration of 2.0
      • Dialog - Create a label for dialog SelectionInfo[2] with the dimensions (350, 50) anchored to Top with an offset of (50, 50) with the text "Sacrificer" color set to Light Blue text writeout set to false with a writeout duration of 2.0
      • Dialog - Create a label for dialog SelectionInfo[2] with the dimensions (350, 400) anchored to Top with an offset of (100, 150) with the text "Creepy zerg queen. Has the abillity..." color set to White text writeout set to true with a writeout duration of 2.0
      • Dialog - Create a label for dialog SelectionInfo[3] with the dimensions (350, 50) anchored to Top with an offset of (50, 50) with the text "Heavy Gimp" color set to Light Blue text writeout set to false with a writeout duration of 2.0
      • Dialog - Create a label for dialog SelectionInfo[3] with the dimensions (350, 400) anchored to Top with an offset of (100, 150) with the text "Heavy stone giant. Its heavy equipm..." color set to White text writeout set to true with a writeout duration of 2.0
  • ChangeTyran7
    • Events
      • UI - Player 7 presses Left key Down with shift Exclude, control Exclude, alt Exclude
      • UI - Player 7 presses Right key Down with shift Exclude, control Exclude, alt Exclude
      • UI - Player 7 presses Escape key Down with shift Exclude, control Exclude, alt Exclude
    • Local Variables
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • SelectionCurrent[1] == 1
        • Then
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Left
            • Then
              • Camera - Apply HeavyGimp for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 3
              • Dialog - Hide SelectionInfo[1] for (Player group(7))
              • Dialog - Show SelectionInfo[3] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Right
            • Then
              • Camera - Apply Sacrificer for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 2
              • Dialog - Hide SelectionInfo[1] for (Player group(7))
              • Dialog - Show SelectionInfo[2] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Escape
            • Then
              • Dialog - Hide SelectionInfo[1] for (Player group(7))
              • Unit - Create 1 Tyran - Psionic Tyran for player 7 at (Random point in TyranSpawn) using default facing (No Options)
              • Unit Selection - Deselect all units for player (Owner of (Last created unit))
              • Unit - Pause (Last created unit)
              • UI - Display "You have chosen Psionic Tyran and w..." for (Player group(7)) to Subtitle area
              • Trigger - Turn (Current trigger) Off
            • Else
        • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • SelectionCurrent[1] == 2
        • Then
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Left
            • Then
              • Camera - Apply PsionicTyran for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 1
              • Dialog - Hide SelectionInfo[2] for (Player group(7))
              • Dialog - Show SelectionInfo[1] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Right
            • Then
              • Camera - Apply HeavyGimp for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 3
              • Dialog - Hide SelectionInfo[2] for (Player group(7))
              • Dialog - Show SelectionInfo[3] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Escape
            • Then
              • Dialog - Hide SelectionInfo[2] for (Player group(7))
              • Unit - Create 1 Tyran - Sacrificer for player 7 at (Random point in TyranSpawn) using default facing (No Options)
              • Unit Selection - Deselect all units for player (Owner of (Last created unit))
              • Unit - Pause (Last created unit)
              • UI - Display "You have chosen Sacrificer and will..." for (Player group(7)) to Subtitle area
              • Trigger - Turn (Current trigger) Off
            • Else
        • Else
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • SelectionCurrent[1] == 3
        • Then
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Left
            • Then
              • Camera - Apply Sacrificer for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 2
              • Dialog - Hide SelectionInfo[3] for (Player group(7))
              • Dialog - Show SelectionInfo[2] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Right
            • Then
              • Camera - Apply PsionicTyran for player 7 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
              • Variable - Set SelectionCurrent[1] = 1
              • Dialog - Hide SelectionInfo[3] for (Player group(7))
              • Dialog - Show SelectionInfo[1] for (Player group(7))
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Key Pressed) == Escape
            • Then
              • Dialog - Hide SelectionInfo[3] for (Player group(7))
              • Unit - Create 1 Tyran - Heavy Gimp for player 7 at (Random point in TyranSpawn) using default facing (No Options)
              • Unit Selection - Deselect all units for player (Owner of (Last created unit))
              • Unit - Pause (Last created unit)
              • UI - Display "You have chosen Heavy Gimp and will..." for (Player group(7)) to Subtitle area
              • Trigger - Turn (Current trigger) Off
            • Else
        • Else
 
Status
Not open for further replies.
Top