Game Development Community

Changing player mount point for vehicle in script

by Stefan Beffy Moises · in Torque Game Engine · 06/21/2002 (3:36 am) · 2 replies

Hi there,
I've tried to mount my player to a ferrari someone posted in the resources...
it works, but unfortunately, the "pilot" mountPoint 0 seems to be in the wrong place (it's the mountpoint for a weapon), so when I mount my player, it always uses the default pilot mountpoint (see www.garagegames.com/docs/torque/tools/max2dts/section5.html#general)...
This is the result...
So is there a way to set the pilot mountpoint to mountPoint2 (which seems to be the correct one)?
Setting it here
// Only mount drivers for now.
      %node = 0;
      %col.mountable=false;// Set Vehicle Unmountable
      %col.mountObject(%obj,%node);
to %node=2 would work, but then I'm only a passenger and therefore can't drive... :-(
Any ideas??
Thanks!!

#1
06/21/2002 (6:24 am)
Mhm, as a hack you can just set:

function Armor::onMount(%this,%obj,%vehicle,%node)
{
   //if (%node == 0)  {
   if (%node == 2)  {

then it works with "node = 2 ...

looks kinda weird in 1st person, but it will get its own gui... 3rd person is ok... :-)
#2
06/21/2002 (8:59 am)
mounts for driver,passenegers are mount0-8, mount9-10 are weapon points . . . mountpoint is for weapons on the player modle mesh