Game Development Community

T3D and BadGuys FlyingVehicle problem. ( Solved )

by Carson Tiller · in Torque 3D Beginner · 03/07/2011 (6:38 am) · 1 replies

Hello,

I've been trying to get badguy's FlyingVehicle stuff ( www.garagegames.com/community/resource/view/2036/ ) to work, I believe I've got it mostly working, except, if I spawn the Drone, either in-game via a keybind or via the World Editor, it just puts the level into a constant loop ( or atleast, thats what it seems like, CPU usage goes to max till I three-finger it. )

Reading the comments, a couple of people sound like they had similar problems, but most of the links they provided are broken, or dont point to anything I see as useful.

My goal here, is to have the player actually start the level as the Drone, and be able to fly about. I'm not trying to make a flight sim, so realistic flight models are not important.

From what I can find, the FGE ( www.garagegames.com/community/blog/view/13111/ ) would be a great place to look, but I cant afford to purchase this, and I dont even think it works with T3D?

So, I'm hoping someone might have an idea whats going wrong, or where I should be looking to try and fix this. I can provide the script resources if anyone needs, but I believe badguy's links are still active to download his samples, which are exactly what I'm using.

Thanks in advance to those that read this, and those that can offer advice.

About the author

A guy, a computer he found, and a strage habbit to tinker.


#1
03/07/2011 (8:20 am)
After some more researching, I managed to solve this.

Following Badguys information, but by using the example datablock from the TDN Wiki ( tdn.garagegames.com/wiki/TorqueScript/Datablocks/FlyingVehicleData ) I have been able to get the Drone into the game via in-game spawn and the World Editor.

It was also quite easy to make the player start the level as the Drone too, to this I changed game/scripts/server/gameDM.cs

Around line 32, in DeathMatchGame::initGameVars() :

$Game::defaultPlayerClass = "FlyingVehicle";
   $Game::defaultPlayerDataBlock = "Drone";

I believe this change could be made in some of the other gameXX.cs files, but I chose gameDM.cs as I'm intending to add other game modes.

When I first tested this, my Drone went nuts, I had already come across this [url]http://www.garagegames.com/community/forums/viewthread/98947/1[url] which sounded 'right'. Some adjustments to hoverHeight and CreateHoverHeight, and all worked.

On the other hand, I've discovered that FlyingVehicle doesnt seem to be what I'm trying to achieve, and am now thinking HoverVehicle is more what I'm after.

Oh well, you live and learn. :)