• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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 19
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