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

-kick <player color> actions (making them shorter)

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2009
Messages
538
  • zzz
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • entered chat string(6, 20, "red")
        • Then - Actions
          • defeat player red/1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • entered chat string(6, 20, "blue")
            • Then - Actions
              • defeat player blue/2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions etc
                • Then - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                    • Then - Actions
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                        • Then - Actions
                        • Else - Actions
                          • ETC ETC ETC
                        • ETC ETC ETC...
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • Event
    • Map initialization
  • Conditions
  • Actions
    • Set StringArray[1]= red
    • Set StringArray[2]= blue
    • Set StringArray[3]= etc etc etc
    • .
    • .
    • .
    • Set PlayerArray[1] = player 1
    • Set PlayerArray[2] = player 2
    • Set PlayerArray[3] = player 3
    • Set PlayerArray[4] = player 4
    • etc etc etc

another trigger

  • zzz
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • For each integer X from 1 to 10 do
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • entered chat string(6, 20) equal to StringArray[X]
          • Then - Actions
            • defeat PlayerArray[X]
          • Else - Actions
a bit smaller ^^
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
yes that that most close to that what i needed,thanks
+Rep

do you know what variables are working in that events ( Player - Player 1 (Red) types a chat message containing -kick as A substring)

BTW this would not be needed Set PlayerArray[1] = player 1
there is a player index action
 
Level 4
Joined
Jun 10, 2009
Messages
67
Here's another way to do it:
  • <<Your Trigger>>
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -kick blue
        • Then - Actions
          • Game - Defeat Player 2 (Blue) with the message: Kicked
        • Else - Actions
          • Game - Keep repeating this and add more Strings, like << -kick teal >> = Defeats teal
 
Status
Not open for further replies.
Top