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

[Solved] Set names

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Set Name Event
    • 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
      • Player - Player 4 (Purple) types a chat message containing -name as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -name as A substring
      • Player - Player 6 (Orange) types a chat message containing -name as A substring
      • Player - Player 7 (Green) types a chat message containing -name as A substring
      • Player - Player 8 (Pink) types a chat message containing -name as A substring
      • Player - Player 9 (Gray) types a chat message containing -name as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -name as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -name as A substring
      • Player - Player 12 (Brown) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
Here's a test map.
 

Attachments

  • Set Name.w3x
    16.1 KB · Views: 43

nGy

nGy

Level 11
Joined
Apr 15, 2011
Messages
123
In your example, P4 wouldn't work and you could also type something like "blahblah -name", which would kinda break the system. So, another check for "-name " being the first 6 characters of the entered string would be required.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • 'IF'-Conditions
      • (Substring((Entered chat string), 0, 6)) Equals -name
    • 'THEN'-Actions
      • Player - Set name of (Triggering Player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
    • 'ELSE'-Actions
 
Last edited:
Status
Not open for further replies.
Top