3rd Person by default
by Michael Niedda · in Torque Game Engine · 10/18/2006 (11:45 pm) · 10 replies
Im using the Starter.FPS to make a demo. What is the easiest way to set the camera to 3rd Person mode by default on start?
About the author
#2
10/18/2006 (11:52 pm)
Where would that setting be exactly? :)
#3
$firstPerson = 0;
ServerConnection.setFirstPerson ($firstPerson);
or just
ServerConnection.setFirstPerson (0);
10/19/2006 (7:16 am)
Its something like$firstPerson = 0;
ServerConnection.setFirstPerson ($firstPerson);
or just
ServerConnection.setFirstPerson (0);
#4
10/19/2006 (10:51 am)
Hmm, I tried this in the default.bind.cc, doesnt work correctly. When i switch to 3rd Person, I cant go back into 1rst after hitting Tab. But still starts at 1rst person. Am I goin into the right .cc file?
#5
It's unfortunate that the edit is in the "common" code rather than in the mod code, though. However, given that things like "armor" or "male" are hard-coded in this function, it seems like any game will have to modify this file anyway, or re-factor it into a per-mod function.
10/19/2006 (11:42 am)
In common/clientConnection.cs, at the end of GameConnection::onConnect(), add a call to:ServerConnection.setFirstPerson(false);
It's unfortunate that the edit is in the "common" code rather than in the mod code, though. However, given that things like "armor" or "male" are hard-coded in this function, it seems like any game will have to modify this file anyway, or re-factor it into a per-mod function.
#6
10/19/2006 (11:55 am)
It works, awesome thanx!
#7
I worked in the TGE 1.5
C:\Torque\SDK\example\common\server\clientConnection.cs
Add
ServerConnection.setFirstPerson(false);
at the end of GameConnection::onConnect()
10/29/2006 (9:22 am)
It's very thanks!!!I worked in the TGE 1.5
C:\Torque\SDK\example\common\server\clientConnection.cs
Add
ServerConnection.setFirstPerson(false);
at the end of GameConnection::onConnect()
#8
I can start the race in 3rd person mode by adding the following line:
to the function "function WheeledVehicleData::onAdd(%this,%obj)" in "car.cs"... but I'd like the count down in 3d person too... how can I do that?
Thanks ;)
11/19/2006 (3:06 pm)
How do I start in 3rd person with the "starter.racing" files?I can start the race in 3rd person mode by adding the following line:
$firstPerson = false;
to the function "function WheeledVehicleData::onAdd(%this,%obj)" in "car.cs"... but I'd like the count down in 3d person too... how can I do that?
Thanks ;)
#9
GameConnection::onClientEnterGame in the server game.cs (server/scripts).
11/19/2006 (4:03 pm)
Enter "ServerConnection.setFirstPerson(false);" as the last line of code in GameConnection::onClientEnterGame in the server game.cs (server/scripts).
#10
11/20/2006 (6:07 am)
Fucifer thanks for your reply...
Torque Owner Mark Junior