mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #574 from Areloch/PrototypingExpansion
Updates Prototyping module
This commit is contained in:
commit
cf8169da5a
|
|
@ -0,0 +1 @@
|
|||
<MaterialAsset canSave="true" canSaveDynamicFields="true" AssetName="Glass" scriptFile="@assetFile=Glass.tscript" materialDefinitionName="Glass" VersionId="1"/>
|
||||
192
Templates/BaseGame/game/data/Prototyping/Materials/Glass.tscript
Normal file
192
Templates/BaseGame/game/data/Prototyping/Materials/Glass.tscript
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new Material(Glass) {
|
||||
diffuseColor[0] = "1 1 1 1";
|
||||
diffuseColor[1] = "1 1 1 1";
|
||||
diffuseColor[2] = "1 1 1 1";
|
||||
diffuseColor[3] = "1 1 1 1";
|
||||
diffuseMapSRGB[0] = "1";
|
||||
diffuseMapSRGB[1] = "1";
|
||||
diffuseMapSRGB[2] = "1";
|
||||
diffuseMapSRGB[3] = "1";
|
||||
detailScale[0] = "2 2";
|
||||
detailScale[1] = "2 2";
|
||||
detailScale[2] = "2 2";
|
||||
detailScale[3] = "2 2";
|
||||
detailNormalMapStrength[0] = "1";
|
||||
detailNormalMapStrength[1] = "1";
|
||||
detailNormalMapStrength[2] = "1";
|
||||
detailNormalMapStrength[3] = "1";
|
||||
roughness[0] = "1";
|
||||
roughness[1] = "1";
|
||||
roughness[2] = "1";
|
||||
roughness[3] = "1";
|
||||
metalness[0] = "0";
|
||||
metalness[1] = "0";
|
||||
metalness[2] = "0";
|
||||
metalness[3] = "0";
|
||||
glowMul[0] = "0";
|
||||
glowMul[1] = "0";
|
||||
glowMul[2] = "0";
|
||||
glowMul[3] = "0";
|
||||
accuEnabled[0] = "0";
|
||||
accuEnabled[1] = "0";
|
||||
accuEnabled[2] = "0";
|
||||
accuEnabled[3] = "0";
|
||||
accuScale[0] = "1";
|
||||
accuScale[1] = "1";
|
||||
accuScale[2] = "1";
|
||||
accuScale[3] = "1";
|
||||
accuDirection[0] = "1";
|
||||
accuDirection[1] = "1";
|
||||
accuDirection[2] = "1";
|
||||
accuDirection[3] = "1";
|
||||
accuStrength[0] = "0.6";
|
||||
accuStrength[1] = "0.6";
|
||||
accuStrength[2] = "0.6";
|
||||
accuStrength[3] = "0.6";
|
||||
accuCoverage[0] = "0.9";
|
||||
accuCoverage[1] = "0.9";
|
||||
accuCoverage[2] = "0.9";
|
||||
accuCoverage[3] = "0.9";
|
||||
accuSpecular[0] = "16";
|
||||
accuSpecular[1] = "16";
|
||||
accuSpecular[2] = "16";
|
||||
accuSpecular[3] = "16";
|
||||
isSRGB[0] = "0";
|
||||
isSRGB[1] = "0";
|
||||
isSRGB[2] = "0";
|
||||
isSRGB[3] = "0";
|
||||
invertRoughness[0] = "0";
|
||||
invertRoughness[1] = "0";
|
||||
invertRoughness[2] = "0";
|
||||
invertRoughness[3] = "0";
|
||||
roughnessChan[0] = "0";
|
||||
roughnessChan[1] = "0";
|
||||
roughnessChan[2] = "0";
|
||||
roughnessChan[3] = "0";
|
||||
AOChan[0] = "1";
|
||||
AOChan[1] = "1";
|
||||
AOChan[2] = "1";
|
||||
AOChan[3] = "1";
|
||||
metalChan[0] = "2";
|
||||
metalChan[1] = "2";
|
||||
metalChan[2] = "2";
|
||||
metalChan[3] = "2";
|
||||
glow[0] = "0";
|
||||
glow[1] = "0";
|
||||
glow[2] = "0";
|
||||
glow[3] = "0";
|
||||
parallaxScale[0] = "0";
|
||||
parallaxScale[1] = "0";
|
||||
parallaxScale[2] = "0";
|
||||
parallaxScale[3] = "0";
|
||||
useAnisotropic[0] = "1";
|
||||
useAnisotropic[1] = "1";
|
||||
useAnisotropic[2] = "1";
|
||||
useAnisotropic[3] = "1";
|
||||
vertLit[0] = "0";
|
||||
vertLit[1] = "0";
|
||||
vertLit[2] = "0";
|
||||
vertLit[3] = "0";
|
||||
vertColor[0] = "0";
|
||||
vertColor[1] = "0";
|
||||
vertColor[2] = "0";
|
||||
vertColor[3] = "0";
|
||||
minnaertConstant[0] = "-1";
|
||||
minnaertConstant[1] = "-1";
|
||||
minnaertConstant[2] = "-1";
|
||||
minnaertConstant[3] = "-1";
|
||||
subSurface[0] = "0";
|
||||
subSurface[1] = "0";
|
||||
subSurface[2] = "0";
|
||||
subSurface[3] = "0";
|
||||
subSurfaceColor[0] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[1] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[2] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[3] = "1 0.2 0.2 1";
|
||||
subSurfaceRolloff[0] = "0.2";
|
||||
subSurfaceRolloff[1] = "0.2";
|
||||
subSurfaceRolloff[2] = "0.2";
|
||||
subSurfaceRolloff[3] = "0.2";
|
||||
emissive[0] = "0";
|
||||
emissive[1] = "0";
|
||||
emissive[2] = "0";
|
||||
emissive[3] = "0";
|
||||
doubleSided = "0";
|
||||
animFlags[0] = "0x00000000";
|
||||
animFlags[1] = "0x00000000";
|
||||
animFlags[2] = "0x00000000";
|
||||
animFlags[3] = "0x00000000";
|
||||
scrollDir[0] = "0 0";
|
||||
scrollDir[1] = "0 0";
|
||||
scrollDir[2] = "0 0";
|
||||
scrollDir[3] = "0 0";
|
||||
scrollSpeed[0] = "0";
|
||||
scrollSpeed[1] = "0";
|
||||
scrollSpeed[2] = "0";
|
||||
scrollSpeed[3] = "0";
|
||||
rotSpeed[0] = "0";
|
||||
rotSpeed[1] = "0";
|
||||
rotSpeed[2] = "0";
|
||||
rotSpeed[3] = "0";
|
||||
rotPivotOffset[0] = "0 0";
|
||||
rotPivotOffset[1] = "0 0";
|
||||
rotPivotOffset[2] = "0 0";
|
||||
rotPivotOffset[3] = "0 0";
|
||||
waveType[0] = "Sin";
|
||||
waveType[1] = "Sin";
|
||||
waveType[2] = "Sin";
|
||||
waveType[3] = "Sin";
|
||||
waveFreq[0] = "0";
|
||||
waveFreq[1] = "0";
|
||||
waveFreq[2] = "0";
|
||||
waveFreq[3] = "0";
|
||||
waveAmp[0] = "0";
|
||||
waveAmp[1] = "0";
|
||||
waveAmp[2] = "0";
|
||||
waveAmp[3] = "0";
|
||||
sequenceFramePerSec[0] = "0";
|
||||
sequenceFramePerSec[1] = "0";
|
||||
sequenceFramePerSec[2] = "0";
|
||||
sequenceFramePerSec[3] = "0";
|
||||
sequenceSegmentSize[0] = "0";
|
||||
sequenceSegmentSize[1] = "0";
|
||||
sequenceSegmentSize[2] = "0";
|
||||
sequenceSegmentSize[3] = "0";
|
||||
cellIndex[0] = "0 0";
|
||||
cellIndex[1] = "0 0";
|
||||
cellIndex[2] = "0 0";
|
||||
cellIndex[3] = "0 0";
|
||||
cellLayout[0] = "0 0";
|
||||
cellLayout[1] = "0 0";
|
||||
cellLayout[2] = "0 0";
|
||||
cellLayout[3] = "0 0";
|
||||
cellSize[0] = "0";
|
||||
cellSize[1] = "0";
|
||||
cellSize[2] = "0";
|
||||
cellSize[3] = "0";
|
||||
bumpAtlas[0] = "0";
|
||||
bumpAtlas[1] = "0";
|
||||
bumpAtlas[2] = "0";
|
||||
bumpAtlas[3] = "0";
|
||||
castShadows = "1";
|
||||
planarReflection = "0";
|
||||
translucent = "1";
|
||||
translucentBlendOp = "PreMul";
|
||||
translucentZWrite = "0";
|
||||
alphaTest = "0";
|
||||
alphaRef = "1";
|
||||
dynamicCubemap = "0";
|
||||
showFootprints = "1";
|
||||
showDust = "0";
|
||||
effectColor[0] = "0 0 0 0";
|
||||
effectColor[1] = "0 0 0 0";
|
||||
footstepSoundId = "-1";
|
||||
impactSoundId = "-1";
|
||||
ImpactFXIndex = "-1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
DiffuseMapAsset[0] = "Prototyping:WaterBlue_ALBEDO";
|
||||
originalAssetName = "Glass";
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -9,11 +9,15 @@ function Prototyping::onDestroy(%this)
|
|||
//This is called when the server is initially set up by the game application
|
||||
function Prototyping::initServer(%this)
|
||||
{
|
||||
%this.queueExec("./scripts/car");
|
||||
}
|
||||
|
||||
//This is called when the server is created for an actual game/map to be played
|
||||
function Prototyping::onCreateGameServer(%this)
|
||||
{
|
||||
%this.registerDatablock("./datablocks/hoverboat.tscript");
|
||||
%this.registerDatablock("./datablocks/car.tscript");
|
||||
%this.registerDatablock("./datablocks/flier.tscript");
|
||||
}
|
||||
|
||||
//This is called when the server is shut down due to the game/map being exited
|
||||
|
|
|
|||
220
Templates/BaseGame/game/data/Prototyping/datablocks/car.tscript
Normal file
220
Templates/BaseGame/game/data/Prototyping/datablocks/car.tscript
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
datablock SFXProfile(cheetahEngine)
|
||||
{
|
||||
preload = "1";
|
||||
description = "AudioCloseLoop3D";
|
||||
fileName = "data/FPSGameplay/sound/cheetah/cheetah_engine.ogg";
|
||||
};
|
||||
|
||||
datablock SFXProfile(cheetahSqueal)
|
||||
{
|
||||
preload = "1";
|
||||
description = "AudioDefault3D";
|
||||
fileName = "data/FPSGameplay/sound/cheetah/cheetah_squeal.ogg";
|
||||
};
|
||||
|
||||
datablock SFXProfile(hardImpact)
|
||||
{
|
||||
preload = "1";
|
||||
description = "AudioDefault3D";
|
||||
fileName = "data/FPSGameplay/sound/cheetah/hardImpact.ogg";
|
||||
};
|
||||
|
||||
datablock SFXProfile(softImpact)
|
||||
{
|
||||
preload = "1";
|
||||
description = "AudioDefault3D";
|
||||
fileName = "data/FPSGameplay/sound/cheetah/softImpact.ogg";
|
||||
};
|
||||
|
||||
datablock SFXProfile(DirtKickup)
|
||||
{
|
||||
preload = "1";
|
||||
description = "AudioDefault3D";
|
||||
fileName = "data/FPSGameplay/sound/cheetah/softImpact.ogg";
|
||||
};
|
||||
|
||||
datablock SFXProfile(CheetahTurretFireSound)
|
||||
{
|
||||
//filename = "data/FPSGameplay/sound/cheetah/turret_firing.wav";
|
||||
filename = "data/FPSGameplay/sound/turret/wpn_turret_fire.wav";
|
||||
description = BulletFireDesc;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock ParticleData(CheetahTireParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/dustParticle";
|
||||
dragCoefficient = "1.99902";
|
||||
gravityCoefficient = "-0.100122";
|
||||
inheritedVelFactor = "0.0998043";
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1000;
|
||||
lifetimeVarianceMS = 400;
|
||||
colors[0] = "0.456693 0.354331 0.259843 1";
|
||||
colors[1] = "0.456693 0.456693 0.354331 0";
|
||||
sizes[0] = "0.997986";
|
||||
sizes[1] = "3.99805";
|
||||
sizes[2] = "1.0";
|
||||
sizes[3] = "1.0";
|
||||
times[0] = "0.0";
|
||||
times[1] = "1";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(CheetahTireEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 20;
|
||||
periodVarianceMS = 10;
|
||||
ejectionVelocity = "14.57";
|
||||
velocityVariance = 1.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 60;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvance = false;
|
||||
particles = "CheetahTireParticle";
|
||||
blendStyle = "ADDITIVE";
|
||||
};*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Information extacted from the shape.
|
||||
//
|
||||
// Wheel Sequences
|
||||
// spring# Wheel spring motion: time 0 = wheel fully extended,
|
||||
// the hub must be displaced, but not directly animated
|
||||
// as it will be rotated in code.
|
||||
// Other Sequences
|
||||
// steering Wheel steering: time 0 = full right, 0.5 = center
|
||||
// breakLight Break light, time 0 = off, 1 = breaking
|
||||
//
|
||||
// Wheel Nodes
|
||||
// hub# Wheel hub, the hub must be in it's upper position
|
||||
// from which the springs are mounted.
|
||||
//
|
||||
// The steering and animation sequences are optional.
|
||||
// The center of the shape acts as the center of mass for the car.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock WheeledVehicleTire(CarTire)
|
||||
{
|
||||
// Tires act as springs and generate lateral and longitudinal
|
||||
// forces to move the vehicle. These distortion/spring forces
|
||||
// are what convert wheel angular velocity into forces that
|
||||
// act on the rigid body.
|
||||
shapeAsset = "Prototyping:carwheel";
|
||||
staticFriction = 4.2;
|
||||
kineticFriction = "1";
|
||||
|
||||
// Spring that generates lateral tire forces
|
||||
lateralForce = 18000;
|
||||
lateralDamping = 6000;
|
||||
lateralRelaxation = 1;
|
||||
|
||||
// Spring that generates longitudinal tire forces
|
||||
longitudinalForce = 18000;
|
||||
longitudinalDamping = 4000;
|
||||
longitudinalRelaxation = 1;
|
||||
radius = "0.609998";
|
||||
};
|
||||
|
||||
datablock WheeledVehicleSpring(CarSpring)
|
||||
{
|
||||
// Wheel suspension properties
|
||||
length = 0.5; // Suspension travel
|
||||
force = 2800; // Spring force
|
||||
damping = 3600; // Spring damping
|
||||
antiSwayForce = 3; // Lateral anti-sway force
|
||||
};
|
||||
|
||||
datablock WheeledVehicleData(Car)
|
||||
{
|
||||
category = "Vehicles";
|
||||
emap = 1;
|
||||
|
||||
mountPose[0] = sitting;
|
||||
numMountPoints = 6;
|
||||
|
||||
useEyePoint = true; // Use the vehicle's camera node rather than the player's
|
||||
|
||||
maxSteeringAngle = 0.585; // Maximum steering angle, should match animation
|
||||
|
||||
// 3rd person camera settings
|
||||
cameraRoll = false; // Roll the camera with the vehicle
|
||||
cameraMaxDist = 7.8; // Far distance from vehicle
|
||||
cameraOffset = 1.0; // Vertical offset from camera mount point
|
||||
cameraLag = "0.3"; // Velocity lag of camera
|
||||
cameraDecay = 1.25; // Decay per sec. rate of velocity lag
|
||||
|
||||
// Rigid Body
|
||||
mass = "400";
|
||||
massCenter = "0 0.5 0"; // Center of mass for rigid body
|
||||
massBox = "0 0 0"; // Size of box used for moment of inertia,
|
||||
// if zero it defaults to object bounding box
|
||||
drag = 0.6; // Drag coefficient
|
||||
bodyFriction = 0.6;
|
||||
bodyRestitution = 0.4;
|
||||
minImpactSpeed = 5; // Impacts over this invoke the script callback
|
||||
softImpactSpeed = 5; // Play SoftImpact Sound
|
||||
hardImpactSpeed = 15; // Play HardImpact Sound
|
||||
integration = 8; // Physics integration: TickSec/Rate
|
||||
collisionTol = "0.1"; // Collision distance tolerance
|
||||
contactTol = "0.4"; // Contact velocity tolerance
|
||||
|
||||
// Engine
|
||||
engineTorque = 4300; // Engine power
|
||||
engineBrake = "5000"; // Braking when throttle is 0
|
||||
brakeTorque = "10000"; // When brakes are applied
|
||||
maxWheelSpeed = 50; // Engine scale by current speed / max speed
|
||||
|
||||
// Energy
|
||||
maxEnergy = 100;
|
||||
jetForce = 3000;
|
||||
minJetEnergy = 30;
|
||||
jetEnergyDrain = 2;
|
||||
|
||||
// Sounds
|
||||
//engineSound = cheetahEngine;
|
||||
//squealSound = cheetahSqueal;
|
||||
//softImpactSound = softImpact;
|
||||
//hardImpactSound = hardImpact;
|
||||
|
||||
// Dynamic fields accessed via script
|
||||
nameTag = 'Cheetah';
|
||||
maxDismountSpeed = 10;
|
||||
maxMountSpeed = 5;
|
||||
mountPose0 = "sitting";
|
||||
// tireEmitter = "CheetahTireEmitter";
|
||||
// dustEmitter = "CheetahTireEmitter";
|
||||
dustHeight = "1";
|
||||
|
||||
// Mount slots
|
||||
turretSlot = 1;
|
||||
rightBrakeSlot = 2;
|
||||
leftBrakeSlot = 3;
|
||||
dragForce = "0.01";
|
||||
ShapeAsset = "Prototyping:car";
|
||||
};
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
//Flying Vehicle
|
||||
//---------------------------------------------------------------------------------------
|
||||
datablock FlyingVehicleData(Flier)
|
||||
{
|
||||
spawnOffset = "0 0 2";
|
||||
category = "Vehicles";
|
||||
shapeAsset = "Prototyping:flier";
|
||||
multipassenger = false;
|
||||
computeCRC = true;
|
||||
|
||||
//debrisShapeName = "~/data/shapes/vehicles/Drone/flyer.dts";
|
||||
//debris = DroneShapeDebris;
|
||||
//renderWhenDestroyed = false;
|
||||
|
||||
drag = 0.15;
|
||||
density = 3.0;
|
||||
|
||||
mountPose[0] = sitting;
|
||||
numMountPoints = 1;
|
||||
isProtectedMountPoint[0] = true;
|
||||
cameraMaxDist = 0.5;
|
||||
cameraOffset = 4.5;
|
||||
cameraLag = 0.0;
|
||||
cameraRoll = true; // Roll the camera with the vehicle
|
||||
|
||||
|
||||
|
||||
// explosion = DroneVehicleExplosion;
|
||||
explosionDamage = 10.5;
|
||||
explosionRadius = 15.0;
|
||||
|
||||
maxDamage = 50.40;
|
||||
destroyedLevel = 50.40;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 160;
|
||||
maxEnergy = 280; // Afterburner and any energy weapon pool
|
||||
rechargeRate = 0.8;
|
||||
|
||||
minDrag = 30; // Linear Drag (eventually slows you down when not thrusting...constant drag)
|
||||
rotationalDrag = 10; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
|
||||
|
||||
maxAutoSpeed = 10; // Autostabilizer kicks in when less than this speed. (meters/second)
|
||||
autoAngularForce = 200; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
|
||||
autoLinearForce = 200; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
|
||||
autoInputDamping = 0.95; // Dampen control input so you don't` whack out at very slow speeds
|
||||
integration = 6; // Physics integration: TickSec/Rate
|
||||
collisionTol = 0.2; // Collision distance tolerance
|
||||
contactTol = 0.1;
|
||||
|
||||
// Maneuvering
|
||||
maxSteeringAngle = 3; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
|
||||
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
|
||||
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
|
||||
maneuveringForce = 2400; // Horizontal jets (W,S,D,A key thrust)
|
||||
steeringForce = 50; // Steering jets (force applied when you move the mouse)
|
||||
steeringRollForce = 10; // Steering jets (how much you heel over when you turn)
|
||||
rollForce = 80; // Auto-roll (self-correction to right you after you roll/invert)
|
||||
hoverHeight = 45; // Height off the ground at rest
|
||||
createHoverHeight = 45; // Height off the ground when created
|
||||
maxForwardSpeed = 60; // speed in which forward thrust force is no longer applied (meters/second)
|
||||
|
||||
// Turbo Jet
|
||||
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
|
||||
minJetEnergy = 28; // Afterburner can't be used if below this threshhold.
|
||||
jetEnergyDrain = 2.8; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
|
||||
vertThrustMultiple = 3.0;
|
||||
|
||||
// Rigid body
|
||||
mass = 30; // Mass of the vehicle
|
||||
bodyFriction = 0; // Don't mess with this.
|
||||
bodyRestitution = 1.0; // When you hit the ground, how much you rebound. (between 0 and 1)
|
||||
minRollSpeed = 2000; // Don't mess with this.
|
||||
softImpactSpeed = 3; // Sound hooks. This is the soft hit.
|
||||
hardImpactSpeed = 15; // Sound hooks. This is the hard hit.
|
||||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 10; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
speedDamageScale = 0.06;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 23.0;
|
||||
collDamageMultiplier = 0.02;
|
||||
|
||||
//
|
||||
minTrailSpeed = 15; // The speed your contrail shows up at.
|
||||
//trailEmitter = DroneContrailEmitter;
|
||||
//forwardJetEmitter = DroneJetEmitter;
|
||||
//downJetEmitter = DroneJetEmitter;
|
||||
|
||||
//
|
||||
//jetSound = DroneThrustSound;
|
||||
//engineSound = DroneEngineSound;
|
||||
//softImpactSound = DroneSoftImpactSound;
|
||||
//hardImpactSound = DroneHardImpactSound;
|
||||
//
|
||||
//softSplashSoundVelocity = 10.0;
|
||||
//mediumSplashSoundVelocity = 15.0;
|
||||
//hardSplashSoundVelocity = 20.0;
|
||||
//exitSplashSoundVelocity = 10.0;
|
||||
|
||||
//exitingWater = DroneExitWaterMediumSound;
|
||||
//impactWaterEasy = DroneImpactWaterSoftSound;
|
||||
//impactWaterMedium = DroneImpactWaterMediumSound;
|
||||
//impactWaterHard = DroneImpactWaterMediumSound;
|
||||
//waterWakeSound = DroneWakeMediumSplashSound;
|
||||
|
||||
// dustEmitter = VehicleLiftoffDustEmitter;
|
||||
|
||||
triggerDustHeight = 4.0;
|
||||
dustHeight = 1.0;
|
||||
|
||||
// damageEmitter[0] = LightDamageSmoke;
|
||||
|
||||
// damageEmitter[1] = HeavyDamageSmoke;
|
||||
|
||||
// damageEmitter[2] = DamageBubbles;
|
||||
|
||||
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
|
||||
damageLevelTolerance[0] = 0.3;
|
||||
damageLevelTolerance[1] = 0.7;
|
||||
numDmgEmitterAreas = 3;
|
||||
|
||||
//
|
||||
//max[RocketAmmo] = 1000;
|
||||
|
||||
minMountDist = 2;
|
||||
|
||||
//splashEmitter[0] = VehicleFoamDropletsEmitter;
|
||||
//splashEmitter[1] = VehicleFoamEmitter;
|
||||
|
||||
//shieldImpact = VehicleShieldImpact;
|
||||
|
||||
//cmdCategory = "Tactical";
|
||||
//cmdIcon = CMDFlyingScoutIcon;
|
||||
//cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
|
||||
//targetNameTag = 'Drone';
|
||||
//targetTypeTag = 'FlyingVehicle';
|
||||
//sensorData = AWACPulseSensor;
|
||||
//sensorRadius = AWACPulseSensor.detectRadius;
|
||||
//sensorColor = "255 194 9";
|
||||
|
||||
checkRadius = 5.5;
|
||||
observeParameters = "0 0 0";
|
||||
|
||||
shieldEffectScale = "0.937 1.125 0.60";
|
||||
};
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
datablock HoverVehicleData(hoverboat)
|
||||
{
|
||||
spawnOffset = "0 0 1";
|
||||
|
||||
floatingGravMag = 55.5;
|
||||
ShapeAsset = "Prototyping:hoverboat";
|
||||
category = "Vehicles";
|
||||
emap = 1;
|
||||
|
||||
category = "Vehicle";
|
||||
|
||||
|
||||
drag = 0.2;
|
||||
density = 0.3;
|
||||
hoverHeight = 3; // Height off the ground at rest
|
||||
createHoverHeight = 3;
|
||||
integration = 4; // Physics integration: TickSec/Rate
|
||||
collisionTol = 0.3; // Collision distance tolerance
|
||||
contactTol = 0.2; // Contact velocity tolerance
|
||||
|
||||
cameraMaxDist = "4.23615";
|
||||
cameraOffset = 5.7;
|
||||
cameraLag = 5.5;
|
||||
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5;
|
||||
|
||||
rechargeRate = 0.7;
|
||||
energyPerDamagePoint = 75;
|
||||
maxEnergy = 650;
|
||||
minJetEnergy = 165;
|
||||
jetEnergyDrain = 1.3;
|
||||
|
||||
// Rigid Body
|
||||
mass = "2";
|
||||
bodyFriction = 0.1;
|
||||
bodyRestitution = 0.3;
|
||||
softImpactSpeed = 20; // Play SoftImpact Sound
|
||||
hardImpactSpeed = 28; // Play HardImpact Sound
|
||||
|
||||
|
||||
dragForce = 1.0;
|
||||
// dragForce = 25 / 45.0;
|
||||
vertFactor = 0.8;
|
||||
floatingThrustFactor = 0.5;
|
||||
|
||||
mainThrustForce = "20";
|
||||
reverseThrustForce = "10";
|
||||
strafeThrustForce = "25";
|
||||
turboFactor = 1.5;
|
||||
|
||||
brakingForce = "20";
|
||||
brakingActivationSpeed = 30;
|
||||
|
||||
stabLenMin = "1.5"; //was 3
|
||||
stabLenMax = "2.5"; //was 4
|
||||
stabSpringConstant = "25";
|
||||
stabDampingConstant = 28;
|
||||
|
||||
gyroDrag = 18; // 16
|
||||
//gyroForce = 50;
|
||||
normalForce = "30";
|
||||
restorativeForce = "19000";
|
||||
steeringForce = "30";
|
||||
rollForce = "0";
|
||||
pitchForce = 30;
|
||||
};
|
||||
20
Templates/BaseGame/game/data/Prototyping/scripts/car.tscript
Normal file
20
Templates/BaseGame/game/data/Prototyping/scripts/car.tscript
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function Car::onAdd(%this, %obj)
|
||||
{
|
||||
Parent::onAdd(%this, %obj);
|
||||
|
||||
%obj.setWheelTire(0,CarTire);
|
||||
%obj.setWheelTire(1,CarTire);
|
||||
%obj.setWheelTire(2,CarTire);
|
||||
%obj.setWheelTire(3,CarTire);
|
||||
|
||||
// Setup the car with some tires & springs
|
||||
for (%i = %obj.getWheelCount() - 1; %i >= 0; %i--)
|
||||
{
|
||||
%obj.setWheelPowered(%i, true);
|
||||
%obj.setWheelSpring(%i, CarSpring);
|
||||
}
|
||||
|
||||
// Steer with the front tires
|
||||
%obj.setWheelSteering(0, 1);
|
||||
%obj.setWheelSteering(1, 1);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
function Flier::onDamage(%this, %obj, %delta)
|
||||
{
|
||||
Parent::onDamage(%this, %obj);
|
||||
%currentDamage = %obj.getDamageLevel();
|
||||
if(%currentDamage > %obj.destroyedLevel)
|
||||
{
|
||||
if(%obj.getDamageState() !$= "Destroyed")
|
||||
{
|
||||
if(%obj.respawnTime !$= "")
|
||||
%obj.marker.schedule = %obj.marker.data.schedule(%obj.respawnTime, "respawn", %obj.marker);
|
||||
%obj.setDamageState(Destroyed);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%obj.getDamageState() !$= "Enabled")
|
||||
%obj.setDamageState(Enabled);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="Car" fileName="@assetFile=car.dae" constuctorFileName="@assetFile=car.tscript"/>
|
||||
537
Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/car.dae
Normal file
537
Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/car.dae
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
singleton TSShapeConstructor(cardae)
|
||||
{
|
||||
baseShapeAsset = "./car.dae";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="carwheel" fileName="@assetFile=carwheel.dae" constuctorFileName="@assetFile=carwheel.tscript"/>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
singleton TSShapeConstructor(carwheeldae)
|
||||
{
|
||||
baseShapeAsset = "./carwheel.dae";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="flier" fileName="@assetFile=flier.dae" constuctorFileName="@assetFile=flier.tscript"/>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
singleton TSShapeConstructor(flierdae)
|
||||
{
|
||||
baseShapeAsset = "./flier.dae";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="hoverboat" fileName="@assetFile=hoverboat.dae" constuctorFileName="@assetFile=hoverboat.tscript"/>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
singleton TSShapeConstructor(hoverboatdae)
|
||||
{
|
||||
baseShapeAsset = "./hoverboat.dae";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
singleton Material(DetailBlue)
|
||||
{
|
||||
mapTo = "DetailBlue";
|
||||
diffuseColor[0] = "0.8 0.8 0.8 1";
|
||||
DiffuseMap[0] = "data/Prototyping/Materials/DetailBlue.png";
|
||||
translucentBlendOp = "None";
|
||||
};
|
||||
Loading…
Reference in a new issue