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
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
About the author
#2
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
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
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
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
Thanks for your help.
Luck!
Guimo
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
Torque Owner Caleb
Default Studio Name
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.