Setting the control object
by Martin Banks · in Torque 3D Professional · 08/18/2009 (3:50 pm) · 6 replies
Where in the full demo project directories can I find the setControlObject calls?
About the author
#2
08/18/2009 (4:13 pm)
The most obvious places to look would be the code sections where a player is spawned, given control of a camera, and mounting/dismounting of vehicles.
#3
I also was able to utilize a find in files, but being unfamiliar with the calling sequence of these scripts, I was left a little overwhelmed. I was hoping to find direction as to the most appropriate place to call setControlObject possibly from those more aquainted with this particular project structure, or more familiar with the convention for calling this function, if one exists.
08/18/2009 (4:35 pm)
Thanks Michael,I also was able to utilize a find in files, but being unfamiliar with the calling sequence of these scripts, I was left a little overwhelmed. I was hoping to find direction as to the most appropriate place to call setControlObject possibly from those more aquainted with this particular project structure, or more familiar with the convention for calling this function, if one exists.
#4
08/18/2009 (4:41 pm)
It is set in spawn.cs on the serverside scripts.
#5
Anything after that is simply transferring the control from a dead player to orbit-cam "corpse mode (GameConnection::onDeath()) to a newly spawned player, transferring to a camera mode, or giving the player control of a vehicle (PlayerData::onMount() and PlayerData::onUnmount() to give control back to the player).
08/18/2009 (4:57 pm)
The initial setControlObject will be called from "core/scripts/server/spawn.cs" in function GameConnection::spawnPlayer().Anything after that is simply transferring the control from a dead player to orbit-cam "corpse mode (GameConnection::onDeath()) to a newly spawned player, transferring to a camera mode, or giving the player control of a vehicle (PlayerData::onMount() and PlayerData::onUnmount() to give control back to the player).
#6
Is there a way to reassign this designation on the fly in the object editor? Possibly calling in the console?
08/18/2009 (6:55 pm)
I'm looking to set this is the world editor in order to test out animations etc, as I edit my character.Is there a way to reassign this designation on the fly in the object editor? Possibly calling in the console?
Associate Michael Hall
Distracted...