Danis[h]
New Member
- Reaction score
- 19
Okay, so I've made a multiboard in which each player's name has to fit.. So obviously to becomes a problem with column width if the player has a very lengthy name.
So what I would like to do is to phrase the name. Or rather count up each character in the string (if possible) and then cut it off at a given number of characters..
example.. character limit for player names is set to 8
Player 5 is named "SomethingStupid" then I would like for my trigger to check his name, see that it is 15 characters long and then change it to display as
"Somethin..."
Result being that his name has been cut down in length to 8 characters with a tripple dot appended to it.
Nevermind.. the solution was very very simple..
So what I would like to do is to phrase the name. Or rather count up each character in the string (if possible) and then cut it off at a given number of characters..
example.. character limit for player names is set to 8
Player 5 is named "SomethingStupid" then I would like for my trigger to check his name, see that it is 15 characters long and then change it to display as
"Somethin..."
Result being that his name has been cut down in length to 8 characters with a tripple dot appended to it.
Nevermind.. the solution was very very simple..
Trigger:
- Name Policing
- Events
- Map initialization
- Conditions
- Actions
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Length of (Name of (Player((Integer A))))) Greater than 8
- Then - Actions
- Set NameLabel[(Integer A)] = ((Substring((Name of (Player((Integer A)))), 1, 8)) + ...)
- Else - Actions
- Set NameLabel[(Integer A)] = (Name of (Player((Integer A))))
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 6, do (Actions)
- Events