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

Rename command

Status
Not open for further replies.
Level 5
Joined
Jul 15, 2018
Messages
111
I am trying to give players the command to rename themselves. I've hit a bit of a road block can't figure out what's missing here.

Events
Player - Player 1 (Red) types a chat message containing -rename as A substring
Player - Player 2 (Blue) types a chat message containing -rename as A substring
Player - Player 3 (Teal) types a chat message containing -rename as A substring
Player - Player 4 (Purple) types a chat message containing -rename as A substring
Player - Player 5 (Yellow) types a chat message containing -rename as A substring
Player - Player 6 (Orange) types a chat message containing -rename as A substring
Player - Player 7 (Green) types a chat message containing -rename as A substring
Player - Player 8 (Pink) types a chat message containing -rename as A substring
Player - Player 9 (Gray) types a chat message containing -rename as A substring
Player - Player 10 (Light Blue) types a chat message containing -rename as A substring
Conditions
(Substring((Entered chat string), 1, 9)) Equal to -rename
Actions
Player - Set name of (Triggering player) to (Substring((Entered chat string), 10, 20))


Thanks in advance :)
 
Level 6
Joined
Jan 16, 2017
Messages
107
If you want it to work just do it like this:
upload_2018-7-16_9-18-39.png

Why your doesnt work? -> The condition that you set is wrong
upload_2018-7-16_9-20-0.png


Substring takes part of a string (In this case (Entered chat string)) and you have to tell it where it is, -rename is made of 7 symbols so you have to set it to 1, 7
upload_2018-7-16_9-24-39.png


Setting the name must be at least one symbol away from the command unless you want players to type it like -renameWorldEdit or if you type
-rename WorldEdit then you will have a space behind your name.

Wrong
upload_2018-7-16_9-28-43.png

upload_2018-7-16_9-29-28.png

Correct
upload_2018-7-16_9-30-29.png

upload_2018-7-16_9-31-7.png

Hopefully you understand :) Good luck.
 

Attachments

  • upload_2018-7-16_9-18-15.png
    upload_2018-7-16_9-18-15.png
    22.8 KB · Views: 72
Status
Not open for further replies.
Top