HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why won't this name change trigger work?

01-03-2008, 02:30 AM#1
Fenrir
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))))

Can someone tell me why the trigger refuses to do anything?
01-03-2008, 12:14 PM#2
Vexorian
"-name" has 5 characters but you are generating an string with 6 characters, when you compare those strings it would return false.
01-03-2008, 01:08 PM#3
redscores
add a space to the typed and to the refer(at the end) and the problem should be solved. Like this:

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