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

[Help!]DOTA Like Commands

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
Ok ok, I know what you're thinking...
DOTA AGAIN?
DOTA sucks.
Hey dude you're remaking DOTA aren't you?
Etc.

But know. I am just wondering about the great code that Icefrog put.
You know -apsoom blah blah blah.
I want like it. It is like a Game Mode Combo in just on shot. Can you help me?
 

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
when a player chats a message, do the action. The message must contain the "-ap" thing, there's no need to be the whole chat message. That's the event. I think that I don't need to explain it further for actions. For every mode, make a trigger with the same event, but instead of "-ap", use let's say "-so".
 
  • Events
    • Player - Player 1 types - as a substring
  • Conditions
    • Substring(EnteredChatString, 1, 1) is equal to -
  • Actions
    • If-then-else
      • If - Conditions
        • Or - Any condition is true
          • Substring(EnteredChatString, 2, 3) is equal to ap
          • Substring(EnteredChatString, 4, 5) is equal to ap
          • Substring(EnteredChatString, 6, 7) is equal to ap
      • Then - Actions
        • another if-then-else for the next modes... etc
with this, you can check first if all the games modes are valid...


or if you don't need to check if all the game modes are valid, just use Vunjo's suggestion: something like this

  • Events
    • Player - Player 1 types - as a substring
  • Conditions
    • Substring(EnteredChatString, 1, 1) is equal to -
    • Or - Any condition is true
      • Substring(EnteredChatString, 2, 3) is equal to ap
      • Substring(EnteredChatString, 4, 5) is equal to ap
      • Substring(EnteredChatString, 6, 7) is equal to ap
  • Actions
    • Do -ap actions here
  • Events
    • Player - Player 1 types - as a substring
  • Conditions
    • Substring(EnteredChatString, 1, 1) is equal to -
    • Or - Any condition is true
      • Substring(EnteredChatString, 2, 3) is equal to so
      • Substring(EnteredChatString, 4, 5) is equal to so
      • Substring(EnteredChatString, 6, 7) is equal to so
  • Actions
    • Do -so actions here
 
Status
Not open for further replies.
Top