Game Development Community

FlyingVehicleData

by Guimo · in Torque Game Engine · 07/11/2006 (8:24 am) · 4 replies

Hi,

First, I'm completely new to Torque but not to game programming. I've read a lot of the Torque docs and books and succesfully tried some examples and scripts.

In my tests, I've been using a starship model exported from a 3DStudio model. The model load fine in the torque showtool and from the mission editor and from some scripts I wrote using the ItemData datablock. So after understanding the basics I decided to try something more suitable for my game.

So I tried this, just to see if I could load something different:

starship.cs
------------------------------
datablock FlyingVehicleData(StarShip)
{
category = "Vehicles";
shapeFile = "~/testapp/data/shapes/player/starship.dts";
mass = 60;
};
------------------------------

Nothing else. The testapp is my testing environment which is a copy of the tutorial.base app.

So I run the application, load the mission editor, then invoke the console and write:
exec("~/testapp/server/sqship.cs");

And in that moment Torque exits. I'm using Torsion as my IDE and I can see in the output that the engine loads the script but then it just closes whithout any additional explanation.

I think it could be something with the definition of the animations/mount points or something inside my ship model. Maybe there are some conditions with the model file I must consider.

Please make your good action of the day and help me :)

Luck!
Guimo

#1
07/11/2006 (8:48 am)
Try telling it to load your script when the game is loaded. What I mean is, there should be a "game.cs" file in your server foulder. In your game.cs file place "exec("~/testapp/server/sqship.cs");" and save.

If torque crashes on startup, then its your code, if your in the mission editor and it crashes when you load your object, then its your model.
#2
07/12/2006 (1:47 pm)
Thanks Caleb,
I tried to load it directly and again it failed. I loaded it as a StaticShapeData datablock and it loaded fine. I was able to put instance objects using this datablock on the map and worked fine. I tired the same again using PlayerData and VehicleData but failed.

Now... I've noticed that my shape may not have a bounding box (collision box). Is it possible that this may be the problem?

Thanks...
Guimo
#3
07/12/2006 (3:18 pm)
I believe its a good Idea to have a bounding box, but I'm not sure that would crash it.

I use LightWave so I don't know how to turn bounding box off (not that I would want to).
Make sure you got the proper nodes, check your model size (if my models are to big it can lockup Torque)
and check out TDN
#4
07/13/2006 (12:05 pm)
I loaded my script using the buggy.dts (aerobuggy) and everything worked fine. Looks like effectively the missing bounding box may be the problem.

Thanks for your help.

Luck!
Guimo