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

[GUI Triggers] Game modes

Status
Not open for further replies.
Can anyone give me a link or a quick guilde on how to make the initial trigger for a game mode (like in DotA or Castle fight you type "-" followed by for example "ap" or "ar")
i need to compare parts of an entered string?

(i think its something about substrings but i'm not sure how it works)

could i use this for a tutorial?

NVM. i think i found out!
  • Modes
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 2, 3)) Equal to ig
              • (Substring((Entered chat string), 4, 5)) Equal to ig
              • (Substring((Entered chat string), 6, 7)) Equal to ig
        • Then - Actions
          • Set Damage = 100.00
          • Game - Display to (All players) the text: Instagib |cff00ff00...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 2, 3)) Equal to sr
              • (Substring((Entered chat string), 4, 5)) Equal to sr
              • (Substring((Entered chat string), 6, 7)) Equal to sr
        • Then - Actions
          • Game - Display to (All players) the text: Speed-regeneration ...
          • Set Regeneration = 2.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 2, 3)) Equal to fb
              • (Substring((Entered chat string), 4, 5)) Equal to fb
              • (Substring((Entered chat string), 6, 7)) Equal to fb
        • Then - Actions
          • Game - Display to (All players) the text: Fast Bolts |cff00ff...
          • Set Speed = 1000.00
          • Set Speed = (Speed / 20.00)
        • Else - Actions
This works as intended
 
Last edited by a moderator:
Status
Not open for further replies.
Top