• 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.

[Trigger] Easy Change name Thing

Status
Not open for further replies.
Level 16
Joined
Jul 21, 2008
Messages
1,121
Try this:
  • NameChanger
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to -name
        • Then - Actions
          • -------- Note that in the condition above i used "-name " with space after -name --------
          • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
        • Else - Actions
 
Try this:
  • NameChanger
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to -name
        • Then - Actions
          • -------- Note that in the condition above i used "-name " with space after -name --------
          • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
        • Else - Actions

Why would you if/then if you could just put it in the condition
 
Status
Not open for further replies.
Top