• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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: 42

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