| 04-23-2003, 12:10 AM | #1 |
Greets. I am trying to cause a player color variable to convert to a string. None of the "Convert X to string" commands seem to be applicable. What can I do? |
| 04-23-2003, 12:20 AM | #2 |
Instead of looking for an efficient way out, just look for the most ovious way. Then if you find a better way, change it. And if you still don't see it: Code:
if(udg_Color == PLAYER_COLOR_RED) then
set udg_strColor = "Red"
endif
if(udg_Color == PLAYER_COLOR_BLUE) then
set udg_strColor = "Blue"
endif
if(udg_Color == PLAYER_COLOR_TEAL) then
set udg_strColor = "Teal"
endif
// Continue for all 12 colors |
| 04-23-2003, 06:54 AM | #3 |
I think MarSara's method will be the best to do, not only will it work, but it is guaranteed to work 100% efficiently. |
| 04-24-2003, 04:05 AM | #4 |
This will require useless computing time and code writing time. Just create a new variable of type string being an array, call it PlayerColorName Add that to your triggers ! event : map initialization conditions : none actions : set PlayerColorName[1] = Red set PlayerColorName[2] = Blue etc... up to set PlayerColorName[12] = Brown then, every time you will need the name of a player X 's color , it will be PlayerColorName[X] thats it ! I hope this helped you Regards. |
