Game Development Community

Togglefps (Newbie question)

by Jacobin · in Torque Game Engine Advanced · 10/04/2006 (5:20 pm) · 1 replies

Hello all,

I recently bought TSE and began to play around with it but have run into a hitch. I figured a good way to start out would be from the starter_water_demo mod, as it seemed to be the least cluttered. Something simple to learn torquescript by loading models in and such.

Taking the models and datablocks from the starter.fps for the orc, I copied over the necessary code to load the model, attach the model to the controller, etc. Everything worked well, I was running around in the beautiful atlas terrain as an animated orc. Happy in the pants! That is until I noticed while the death animations and fly camera mode worked, I was unable to get the camera transform for freelook/3ps working. Looked around for the functions and found these.

function toggleFreeLook( %val )
{
   if ( %val )
      $mvFreeLook = true;
   else
      $mvFreeLook = false;
}

function toggleFirstPerson(%val)
{
   if (%val)
   {
      $firstPerson = !$firstPerson;
   }
}


At first I started with the basics. Verify the keybinds are firing with echo statements placed in the functions. They were, but the camera transforms were not occuring. So I've searched everwhere in the script files using jedit for things such as settransform, camera, etc. Can someone give a newbie a clue as to where else to look?

-Jac

#1
10/05/2006 (12:19 am)
Solved:

File was somehow missing a ServerConnection.setFirstPerson($firstPerson); call within the function. Imagine it was deleted instead of commented out in order to disable third person in the terrain demo.

-Jac