Ok, i was wokring on my SkyHawk vehicle and i want it to have guns on 2 sides like the arwing does. I messed around with the f 18 Hornet script to get an idea of what i am doing but it still doesn't work. If you need a copy of the milkshape file, i will send it. Here is the code
datablock AudioProfile(SkyHawkfireSound)
{
filename = "./SkyHawkfire.WAV";
description = AudioDefault3d;
preload = true;
};
datablock ParticleData(SkyHawkExplosionRingParticle)
{
dragCoefficient = 8;
gravityCoefficient = -0.5;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 50;
lifetimeVarianceMS = 35;
textureName = "base/data/particles/dot";
spinSpeed = 500.0;
spinRandomMin = -500.0;
spinRandomMax = 500.0;
colors[0] = "0 1 1 1";
colors[1] = "1 1 1 1";
sizes[0] = 1;
sizes[1] = 0;
useInvAlpha = false;
};
datablock ParticleEmitterData(SkyHawkExplosionRingEmitter)
{
lifeTimeMS = 50;
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 89;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "SkyHawkExplosionRingParticle";
useEmitterColors = true;
};
datablock ExplosionData(SkyHawkgunExplosion)
{
//explosionShape = "";
soundProfile = SkyHawkhitsound;
lifeTimeMS = 150;
particleEmitter = SkyHawkExplosionRingEmitter;
particleDensity = 5;
particleRadius = 0.2;
emitter[0] = SkyHawkExplosionRingEmitter;
faceViewer = true;
explosionScale = "1 1 1";
shakeCamera = false;
camShakeFreq = "10.0 11.0 10.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 0.5;
camShakeRadius = 10.0;
// Dynamic light
lightStartRadius = 0;
lightEndRadius = 2;
lightStartColor = "0.3 0.6 0.7";
lightEndColor = "0 0 0";
};
// Bullet holes
datablock DecalData(explosionDecal)
{
sizeX = 0.1;
sizeY = 0.1;
textureName = "./bullethole3";
};
datablock ProjectileData(SkyHawkProjectile)
{
projectileShapeName = "add-ons/weapon_gun/bullet.dts";
directDamage = 5;
brickExplosionRadius = 0;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 10;
brickExplosionMaxVolume = 1; //max volume of bricks that we can destroy
brickExplosionMaxVolumeFloating = 2; //max volume of bricks that we can destroy if they aren't connected to the ground
impactImpulse = 400;
verticalImpulse = 400;
explosion = gunexplosion;
particleEmitter = ""; //bulletTrailEmitter;
muzzleVelocity = 90;
velInheritFactor = 1;
armingDelay = 00;
lifetime = 4000;
fadeDelay = 3500;
bounceElasticity = 0.5;
bounceFriction = 0.20;
isBallistic = false;
gravityMod = 0.0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
};
datablock DebrisData(SkyHawkDebris)
{
emitters = "jeepDebrisTrailEmitter";
shapeFile = "./SkyHawk.dts";
lifetime = 3.0;
minSpinSpeed = -300.0;
maxSpinSpeed = 300.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 1;
staticOnMaxBounce = true;
snapOnMaxBounce = false;
fade = true;
gravModifier = 2;
};
datablock ExplosionData(SkyHawkFinalExplosion)
{
//explosionShape = "";
lifeTimeMS = 150;
soundProfile = vehicleExplosionSound;
emitter[0] = vehicleFinalExplosionEmitter3;
emitter[1] = vehicleFinalExplosionEmitter2;
particleEmitter = vehicleFinalExplosionEmitter;
particleDensity = 20;
particleRadius = 1.0;
debris = SkyHawkDebris;
debrisNum = 1;
debrisNumVariance = 0;
debrisPhiMin = 0;
debrisPhiMax = 360;
debrisThetaMin = 0;
debrisThetaMax = 50;
debrisVelocity = 15;
debrisVelocityVariance = 3;
faceViewer = true;
explosionScale = "1 1 1";
shakeCamera = true;
camShakeFreq = "7.0 8.0 7.0";
camShakeAmp = "10.0 10.0 10.0";
camShakeDuration = 0.75;
camShakeRadius = 15.0;
// Dynamic light
lightStartRadius = 0;
lightEndRadius = 20;
lightStartColor = "0.45 0.3 0.1";
lightEndColor = "0 0 0";
//impulse
impulseRadius = 15;
impulseForce = 1000;
impulseVertical = 2000;
//radius damage
radiusDamage = 30;
damageRadius = 8.0;
//burn the players?
playerBurnTime = 5000;
};
datablock ProjectileData(SkyHawkFinalExplosionProjectile)
{
directDamage = 0;
radiusDamage = 0;
damageRadius = 0;
explosion = SkyHawkFinalExplosion;
directDamageType = $DamageType::jeepExplosion;
radiusDamageType = $DamageType::jeepExplosion;
explodeOnDeath = 1;
armingDelay = 0;
lifetime = 10;
};
datablock WheeledVehicleData(SkyHawkVehicle)
{
category = "Vehicles";
displayName = " ";
shapeFile = "./SkyHawk.dts"; //"~/data/shapes/skivehicle.dts"; //
emap = true;
minMountDist = 3;
numMountPoints = 5;
mountThread[0] = "sit";
mountThread[1] = "sit";
mountThread[2] = "sit";
mountThread[3] = "sit";
mountThread[4] = "sit";
Fshootonclick=1;
Fshootonclick_Hold=1;
Fshootonclick_ShootDelay=100;
Fshootonclick_ReShootDelay=100;
Fshootonclick_ProjectileCount=1;
Fshootonclick_RequiredSlot=0;
Fshootonclick_Sound=SkyHawkfireSound;
Fshootonclick_Projectile[3]=SkyHawkProjectile;
Fshootonclick_Position[3]="0 0 -1";
Fshootonclick_Velocity[3]="200 0 0";
Fshootonclick_Scale[3]="1 1 1";
Fshootonclick_Projectile[4]=SkyHawkProjectile;
Fshootonclick_Position[4]="0 0 -1";
Fshootonclick_Velocity[4]="200 0 0";
Fshootonclick_Scale[4]="1 1 1";
maxDamage = 100.00;
destroyedLevel = 200.00;
energyPerDamagePoint = 160;
speedDamageScale = 1.04;
collDamageThresholdVel = 20.0;
collDamageMultiplier = 0.02;
massCenter = "0 0 0";
//massBox = "2 5 1";
maxSteeringAngle = 0.9785; // Maximum steering angle, should match animation
integration = 4; // Force integration time: TickSec/Rate
//tireEmitter = JeepTireEmitter; // All the tires use the same dust emitter
// 3rd person camera settings
cameraRoll = false; // Roll the camera with the vehicle
cameraMaxDist = 24; // Far distance from vehicle
cameraOffset = 7.5; // Vertical offset from camera mount point
cameraLag = 0.2; // Velocity lag of camera
cameraDecay = 0.75; // Decay per sec. rate of velocity lag
cameraTilt = 0.4;
collisionTol = 0.1; // Collision distance tolerance
contactTol = 0.1;
useEyePoint = false;
numWheels = 0;
// Rigid Body
mass = 200;
density = 2.5;
drag = 0.9;
bodyFriction = 0.6;
bodyRestitution = 0.6;
minImpactSpeed = 10; // Impacts over this invoke the script callback
softImpactSpeed = 10; // Play SoftImpact Sound
hardImpactSpeed = 15; // Play HardImpact Sound
groundImpactMinSpeed = 10.0;
// Engine
engineTorque = 12000; //4000; // Engine power
engineBrake = 2000; // Braking when throttle is 0
brakeTorque = 4000; // When brakes are applied
maxWheelSpeed = 20; // Engine scale by current speed / max speed
rollForce = 900;
yawForce = 600;
pitchForce = 1000;
rotationalDrag = 0.2;
// Energy
maxEnergy = 100;
jetForce = 3000;
minJetEnergy = 30;
jetEnergyDrain = 2;
isSled = false;
forwardThrust = 4000;
reverseThrust = 5000;
lift = 100;
maxForwardVel = 68;
maxReverseVel = 10;
horizontalSurfaceForce = 130; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 130;
rollForce = 8000;
yawForce = 6000;
pitchForce = 6000;
rotationalDrag = 0.9;
stallSpeed = 10;
// forwardThrust = 2000;
// reverseThrust = 2000;
// lift = 100;
// maxForwardVel = 70;
// maxReverseVel = 70;
// horizontalSurfaceForce = 100; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
// verticalSurfaceForce = 100;
// rollForce = 6000;
// yawForce = 6000;
// pitchForce = 4000;
// rotationalDrag = 0.5;
// stallSpeed = 10;
//
// forwardThrust = 2500;
// reverseThrust = 500;
// lift = 15000;
// maxForwardVel = 60;
// maxReverseVel = 10;
// horizontalSurfaceForce = 500; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
// verticalSurfaceForce = 500;
// rollForce = 5000;
// yawForce = 5000;
// pitchForce = 5000;
// rotationalDrag = 0.1;
// stallSpeed = 10;
splash = SkyHawkSplash;
splashVelocity = 4.0;
splashAngle = 67.0;
splashFreqMod = 300.0;
splashVelEpsilon = 0.60;
bubbleEmitTime = 1.4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
splashEmitter[2] = VehicleBubbleEmitter;
mediumSplashSoundVelocity = 10.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 5.0;
//mediumSplashSound = "";
//hardSplashSound = "";
//exitSplashSound = "";
// Sounds
// jetSound = ScoutThrustSound;
//engineSound = engineidleSound;
//squealSound = skidSound;
softImpactSound = slowImpactSound;
hardImpactSound = fastImpactSound;
//wheelImpactSound = slowImpactSound;
// explosion = VehicleExplosion;
justcollided = 0;
uiName = "SkyHawk";
rideable = true;
lookUpLimit = 0.65;
lookDownLimit = 0.65;
paintable = true;
damageEmitter[0] = VehicleBurnEmitter;
damageEmitterOffset[0] = "0.0 0.0 0.0 ";
damageLevelTolerance[0] = 0.99;
damageEmitter[1] = VehicleBurnEmitter;
damageEmitterOffset[1] = "0.0 0.0 0.0 ";
damageLevelTolerance[1] = 1.0;
numDmgEmitterAreas = 1;
burnTime = 10;
finalExplosionProjectile = SkyHawkFinalExplosionProjectile;
finalExplosionOffset = 0.5; //offset only uses a z value for now
minRunOverSpeed = 2; //how fast you need to be going to run someone over (do damage)
runOverDamageScale = 5; //when you run over someone, speed * runoverdamagescale = damage amt
runOverPushScale = 1.2; //how hard a person you're running over gets pushed
minSkyHawkSpeed = 15;
// Advanced Steering
steeringAutoReturn = false;
steeringUseStrafeSteering = false;
};