Naming a player
by Bristow · in Torque Game Engine · 04/12/2006 (9:06 am) · 5 replies
I know you can set the player's name using:
1111.setName(Bob)
but I only know how to do that in the console in the mission editor,I want to know how to set the name ahead of time so the player, and even AI, have a preset name everytime they spawn and not a number that
changes everytime
would there be anyway to do this in the script beforehand so that everytime the player spawns his name is
automatically Bob? (assuming you want his name to be Bob)
1111.setName(Bob)
but I only know how to do that in the console in the mission editor,I want to know how to set the name ahead of time so the player, and even AI, have a preset name everytime they spawn and not a number that
changes everytime
would there be anyway to do this in the script beforehand so that everytime the player spawns his name is
automatically Bob? (assuming you want his name to be Bob)
About the author
#2
for the call to %player.setShapeName().
shapeName is what shows up above the player in the HUD;
name is the name of the variable, not the player.
04/12/2006 (3:22 pm)
Look in GameConnection::createPlayer()for the call to %player.setShapeName().
shapeName is what shows up above the player in the HUD;
name is the name of the variable, not the player.
#3
04/14/2006 (8:40 am)
Ok, but where is GameConnection::createPlayer() located, I mean which .cs?
#4
04/14/2006 (8:59 am)
Server/scripts/game.cs
#5
04/14/2006 (9:05 am)
@bristow - a decent "find in files" utility is the #1 tool you can use for just about any kind of development, including torque. the free version of visual studio for example, will search all your C and Script files for text like "GameConnection::createPlayer" and get you the answer in like three seconds.
Torque Owner D B