Starting 3rd person
by Edward Gardner · in Torque Game Engine · 08/25/2001 (9:44 pm) · 13 replies
What syntax would I use in which script file (Jrah suggested game.cs in the server folder, which is where I might have guessed, but...) to start the app in 3rd person mode?
#2
bool GameConnection::mFirstPerson = true;
change that to false and the default SHOULD be thirdperson I believe (about to try it myself).
Phil.
08/26/2001 (3:40 am)
Ed in GameConnection.cc at line 32 there is:bool GameConnection::mFirstPerson = true;
change that to false and the default SHOULD be thirdperson I believe (about to try it myself).
Phil.
#3
Thanks for the tips, guys. Time for some coffee and I'll give it a shot :)
08/26/2001 (5:48 am)
One thing I have noticed, is that alot of these things can be changed in more than one place :)Thanks for the tips, guys. Time for some coffee and I'll give it a shot :)
#4
I'll poke at the .cc file, thanks Phil.
Can you feel the love?
:)
Seriously, so far this has been the most pleasant experiece I have had ina LONG time with any kind of development or learning. The engine is pretty easy, and the community is bending over itself to help each other. Happy, happy ;)
08/26/2001 (6:06 am)
That works, James. Like a champ.I'll poke at the .cc file, thanks Phil.
Can you feel the love?
:)
Seriously, so far this has been the most pleasant experiece I have had ina LONG time with any kind of development or learning. The engine is pretty easy, and the community is bending over itself to help each other. Happy, happy ;)
#5
You should be able to set the firstPerson mode for the client in the server's game.cs script (onClientEnterGame), whithout having to change the C++ code.
08/28/2001 (9:22 am)
The thing to watch out for.... $firstPerson is a client side variable which clients can use to toggle first person mode. $GameConnection::firstPerson is the server side equivilent. Setting $firstPerson on a dedicated server doesn't do anything.You should be able to set the firstPerson mode for the client in the server's game.cs script (onClientEnterGame), whithout having to change the C++ code.
#6
I think I may incorporate that dynamic 3rd person camera from that new tut. Sounds like it will solve my problem.
However, if someone can tell me the script syntax, that would be spiffy :)
This is whta I got, and it now workie on a dedi server:
function onClientEnterGame(%client)
{
messageClient(%client, 'MsgSystemClock', "", 0, 0);
// Create a new camera object.
%client.camera = new Camera() {
dataBlock = Observer;
};
MissionCleanup.add( %client.camera );
%client.camera.scopeToClient(%client);
// Create a player object.
spawnPlayer(%client);
$GameConnection::firstPerson = false;
}
What have I done wrong?
08/28/2001 (6:40 pm)
I am just missing the syntax.I think I may incorporate that dynamic 3rd person camera from that new tut. Sounds like it will solve my problem.
However, if someone can tell me the script syntax, that would be spiffy :)
This is whta I got, and it now workie on a dedi server:
function onClientEnterGame(%client)
{
messageClient(%client, 'MsgSystemClock', "", 0, 0);
// Create a new camera object.
%client.camera = new Camera() {
dataBlock = Observer;
};
MissionCleanup.add( %client.camera );
%client.camera.scopeToClient(%client);
// Create a player object.
spawnPlayer(%client);
$GameConnection::firstPerson = false;
}
What have I done wrong?
#7
P.S. I would love it if you tried the 3rd person camera tutorial :) I am real interested in getting feedback on the presentation and content in the tutorial in hopes to make them better as we go.
08/28/2001 (6:43 pm)
You can just use $firstPerson = false. You don't need the "GameConnection::" namespace declaration in script.P.S. I would love it if you tried the 3rd person camera tutorial :) I am real interested in getting feedback on the presentation and content in the tutorial in hopes to make them better as we go.
#8
08/28/2001 (7:43 pm)
Feedback posted :)
#9
08/28/2001 (9:32 pm)
Where can I find the 3rd-person camera tut?
#11
08/29/2001 (9:25 am)
Grr...don't have V12 so I can't access the thread. :(
#13
08/29/2001 (1:53 pm)
Thanks for putting the tut up. It's definitely interesting to see what's entailed in changing the engine in such a way. Since I'm going to be doing something similar, I want to make sure changing parts of V12 won't be too much of a hassle.
Torque Owner James Killick
$firstperson = false;
Not sure if this is the best way since I'm a total beginner at this game stuff:)
Regards