Game Development Community

Adding additional jet emitters

by Cyberkada · in Torque Game Engine · 08/08/2007 (5:00 am) · 1 replies

I need to add addition rear jetNozzles, more than the built-in jetNozzle0 and jetNozzle1. Some ships in my game require 4 instead of the normal 2. I tried changing flyingVehicle.cc and flyingVehicle.h (added jetNozzle4 and jetNozzle5 to flyingVehicle.cc and ForwardJetNode1 and ForwardJetNode2 to flyingVehicle.h, but the game crashes after a few minutes. Any suggestions?

#1
08/08/2007 (6:30 am)
I think I solved it for now.

To add emitters:
in flyingVehicle.cc

const char* FlyingVehicleData::sJetNode[FlyingVehicleData::MaxJetNodes] function

add "JetNozzle4",
"JetNozzle5",

after "JetNozzle1 (2 and 3 are being used for Thrust Downward)

in flyingVehicle.h

enum JetNodes {
add the following: FowardJetNode2,
FowardJetNode3,

Change MaxDirectionJets = 2, to MaxDirectionJets = 4,

add nodes JetNozzle4 and JetNozzle5 to your models.

to give you 4 forward emitters.