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

Need help with name trigger

Status
Not open for further replies.
Level 1
Joined
Jan 2, 2008
Messages
3
  • name
    • Events
      • Player - Player 8 (Pink) types a chat message containing -name as A substring
      • Player - Player 7 (Green) types a chat message containing -name as A substring
      • Player - Player 6 (Orange) types a chat message containing -name as A substring
      • Player - Player 5 (Yellow) types a chat message containing -name as A substring
      • Player - Player 4 (Purple) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 9, (Length of (Entered chat string))))
I got this format from another thread, but every time I tested it it would change my name to (Substring((Entered chat string), 9, (Length of (Entered chat string)))). Someone help me.
 
Level 5
Joined
Nov 12, 2007
Messages
134
Also, make sure that you have this condition:

  • Name
    • Events
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -name
    • Actions

If you don't, people can change their name by typing "-name " even if it's at the end of the entered chat string.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Try its code and not text. . .

You have to make that part of the trigger and not enter it in as text as it is meant to retrieve something that is variable, and not be a constant.

Sorry GUI is not JASS (you can not just copy them in text form), so yet another + point to JASS.
 
Level 1
Joined
Jan 2, 2008
Messages
3
  • name
    • Events
      • Player - Player 8 (Pink) types a chat message containing -name as A substring
      • Player - Player 7 (Green) types a chat message containing -name as A substring
      • Player - Player 6 (Orange) types a chat message containing -name as A substring
      • Player - Player 5 (Yellow) types a chat message containing -name as A substring
      • Player - Player 4 (Purple) types a chat message containing -name as A substring
      • Player - Player 3 (Teal) types a chat message containing -name as A substring
      • Player - Player 2 (Blue) types a chat message containing -name as A substring
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -name
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))

This is the trigger after doing what everyone says, and now its not doing anything
 
Level 1
Joined
Jan 2, 2008
Messages
3
And I honestly, have NO idea about JASS or GUI or w/e, so don't expect me to understand those things.
 
Status
Not open for further replies.
Top