Game Development Community

Character won't mount at mount0 in my vehicle.

by Nmuta Jones · in Torque Game Engine · 06/22/2009 (10:29 am) · 10 replies

I am using the simple car script that comes with the starter.racing folder in TGE 1.5.2


In my player.cs, I am using the default method of mounting a vehicle:
function Armor::onCollision(%this,%obj,%col)
{
   ....................

   // Mount vehicles
   %this = %col.getDataBlock();
   if ((%this.className $= WheeledVehicleData) && %obj.mountVehicle &&
         %obj.getState() $= "Move" && %col.mountable) {

      // Only mount drivers for now.
      %node = 0;
      %col.mountObject(%obj,%node);
      %obj.mVehicle = %col;
   }
}

My car, (a very slightly modified version of the Torque buggy) has a mount0 node that is parented directly to start01 in 3ds Max 9.


My character mounts the car fine, and drives ok, but he will NOT mount at mount 0 !!!! I have mount0 toward the back of the car and he insists upon mounting smack in the middle of the car.

Any ideas on what I'm doing wrong?

#1
06/22/2009 (11:45 am)
I think it should be base01 then start01

tdn.garagegames.com/wiki/images/4/4e/Flying_nodes.png
#2
06/22/2009 (12:04 pm)
Also if TGE is unable to find the named mountpoint it returns the Render Transform of the object which explains the results you are getting.

#3
06/22/2009 (12:28 pm)
Yes, I have base01 then start 01 then the mount0

www.mediabreeze.com/images/schematic.jpg
#4
06/22/2009 (1:21 pm)
Have you tried loading it into showtool pro and see if the node is showing up correctly?
#5
06/22/2009 (1:39 pm)
I loaded into ShowTool Pro.

The mount0 does NOT appear to be showing up in there.. and it appears to be parented correctly. What could be the reason it's not exporting properly?
#6
06/22/2009 (1:45 pm)
The exporter you are using for max , is it the one you have to use a text config/cfg file?

If so make sure that both start01 and base01 as well as mount0 are in the AlwaysExport section and not in the NeverExport section.
#7
06/22/2009 (1:58 pm)
That's embarrasing..... I can't believe I forgot to think about the .cfg file. That was it.

Problem solved. Thanks man.

#8
10/04/2009 (1:26 am)
Hi my name is zach and I need some help with the torque game engine such as mounting,health ,buttons and some freezing problems so if anyone can help that would be great.If you can help me email me a zachary06496@yahoo.com.
Thanks,

Zach
#9
10/04/2009 (1:29 am)
Hey Zach, just post up your questions on the forum and we'll try to help out. But maybe create (a) new thread(s) for your problems.
#10
10/08/2009 (3:49 am)
Well we are in the mounting post anyway I would like to ask how exactly do I get my player to mount the vehicle I am confused about that,because I can't find the code to actually get him to mount.One other thing is that I would also like to know how to make AI players appear in the game.

Thanks,

Zach