• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Is there a way...

Status
Not open for further replies.
Level 13
Joined
Sep 14, 2008
Messages
1,407
Hmm I am not completly sure about this :/

Sure you can only pick 12 units ingame but I think there should be some way of triggering a bigger selection :/

You can still use a unit groud and add and pick all to get more than 12 units.

Maybe you could create a keyboard event system like when a player presses "+" the selected units are added to a unitground which he can use later?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's how to limit selection to something less than 12 units:

  • Untitled Trigger 008 Copy
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
    • Actions
      • Set Temp_Group_1 = (Units currently selected by (Triggering player))
      • Set Temp_Integer_1 = (Number of units in Temp_Group_1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer_1 Greater than 5
        • Then - Actions
          • Set Temp_Integer_2 = (Player number of (Triggering player))
          • Set Selection_Integer_1[Temp_Integer_2] = (Selection_Integer_1[Temp_Integer_2] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Selection_Integer_1[Temp_Integer_2] Less than (Temp_Integer_1 - 4)
            • Then - Actions
              • Selection - Remove (Triggering unit) from selection for (Triggering player)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Selection_Integer_1[Temp_Integer_2] Equal to Temp_Integer_1
                • Then - Actions
                  • Set Selection_Integer_1[Temp_Integer_2] = 0
                • Else - Actions
        • Else - Actions
This limits units selected to 5. To change the limit, change that 5 to the new max, and that 4 to new max - 1.

EDIT: Damn, you can still add more units by holding shift :/ Fixing...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
This is slightly better, units are limited to 5 when you use dragbox selection, doubleclicking or shift clicking. Shift-doubleklicking still bugs.

  • Untitled Trigger 008 Copy Copy Copy
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
    • Actions
      • Set Temp_Group_1 = (Units currently selected by (Triggering player))
      • Set Temp_Integer_1 = (Number of units in Temp_Group_1)
      • Set Temp_Integer_2 = (Player number of (Triggering player))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Integer_1 Greater than 5
        • Then - Actions
          • Set Selection_Integer_1[Temp_Integer_2] = (Selection_Integer_1[Temp_Integer_2] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Selection_Integer_1[Temp_Integer_2] Less than (Temp_Integer_1 - 4)
            • Then - Actions
              • Selection - Remove (Triggering unit) from selection for (Triggering player)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Integer_1 Equal to 6
                • Then - Actions
                  • Set Selection_Integer_1[Temp_Integer_2] = 0
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Selection_Integer_1[Temp_Integer_2] Equal to Temp_Integer_1
                • Then - Actions
                  • Set Selection_Integer_1[Temp_Integer_2] = 0
                • Else - Actions
        • Else - Actions
 
Status
Not open for further replies.
Top