mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-27 08:09:31 +00:00
Initial implementation of the new Base Game Template and some starting modules.
This makes some tweaks to the engine to support this, specifically, it tweaks the hardcoded shaderpaths to defer to a pref variable, so none of the shader paths are hardcoded. Also tweaks how post effects read in texture files, removing a bizzare filepath interpretation choice, where if the file path didn't start with "/" it forcefully appended the script's file path. This made it impossible to have images not in the same dir as the script file defining the post effect. This was changed and the existing template's post effects tweaked for now to just add "./" to those few paths impacted, as well as the perf vars to support the non-hardcoded shader paths in the engine.
This commit is contained in:
parent
5c8a82180b
commit
d680dc9934
2321 changed files with 296541 additions and 85 deletions
|
|
@ -0,0 +1,819 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Sounds
|
||||
//--------------------------------------------------------------------------
|
||||
datablock SFXProfile(LurkerFireSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_lurker_fire";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(LurkerReloadSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_lurker_reload";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(LurkerIdleSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_lurker_idle";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(LurkerSwitchinSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_lurker_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(LurkerGrenadeFireSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_lurker_grenadelaunch";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXPlayList(LurkerFireSoundList)
|
||||
{
|
||||
// Use a looped description so the list playback will loop.
|
||||
description = AudioClose3D;
|
||||
|
||||
track[ 0 ] = LurkerFireSound;
|
||||
};
|
||||
|
||||
/*datablock SFXProfile(BulletImpactSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/SCARFIRE";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};*/
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Particles
|
||||
// ----------------------------------------------------------------------------
|
||||
datablock ParticleData(GunFireSmoke)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
dragCoefficient = 0;
|
||||
gravityCoefficient = "-1";
|
||||
windCoefficient = 0;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 200;
|
||||
spinRandomMin = -180.0;
|
||||
spinRandomMax = 180.0;
|
||||
useInvAlpha = true;
|
||||
|
||||
colors[0] = "0.795276 0.795276 0.795276 0.692913";
|
||||
colors[1] = "0.866142 0.866142 0.866142 0.346457";
|
||||
colors[2] = "0.897638 0.834646 0.795276 0";
|
||||
|
||||
sizes[0] = "0.399805";
|
||||
sizes[1] = "1.19941";
|
||||
sizes[2] = "1.69993";
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = "0.498039";
|
||||
times[2] = 1.0;
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GunFireSmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 20;
|
||||
periodVarianceMS = 10;
|
||||
ejectionVelocity = "0";
|
||||
velocityVariance = "0";
|
||||
thetaMin = "0";
|
||||
thetaMax = "0";
|
||||
lifetimeMS = 250;
|
||||
particles = "GunFireSmoke";
|
||||
blendStyle = "NORMAL";
|
||||
softParticles = "0";
|
||||
originalName = "GunFireSmokeEmitter";
|
||||
alignParticles = "0";
|
||||
orientParticles = "0";
|
||||
};
|
||||
|
||||
datablock ParticleData(BulletDirtDust)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/impact";
|
||||
dragCoefficient = "1";
|
||||
gravityCoefficient = "-0.100122";
|
||||
windCoefficient = 0;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = "-0.83";
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 300;
|
||||
spinRandomMin = -180.0;
|
||||
spinRandomMax = 180.0;
|
||||
useInvAlpha = true;
|
||||
|
||||
colors[0] = "0.496063 0.393701 0.299213 0.692913";
|
||||
colors[1] = "0.692913 0.614173 0.535433 0.346457";
|
||||
colors[2] = "0.897638 0.84252 0.795276 0";
|
||||
|
||||
sizes[0] = "0.997986";
|
||||
sizes[1] = "2";
|
||||
sizes[2] = "2.5";
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = "0.498039";
|
||||
times[2] = 1.0;
|
||||
animTexName = "data/FPSGameplay/art/particles/impact";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(BulletDirtDustEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 20;
|
||||
periodVarianceMS = 10;
|
||||
ejectionVelocity = "1";
|
||||
velocityVariance = 1.0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
lifetimeMS = 250;
|
||||
particles = "BulletDirtDust";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Explosion
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ExplosionData(BulletDirtExplosion)
|
||||
{
|
||||
soundProfile = BulletImpactSound;
|
||||
lifeTimeMS = 65;
|
||||
|
||||
// Volume particles
|
||||
particleEmitter = BulletDirtDustEmitter;
|
||||
particleDensity = 4;
|
||||
particleRadius = 0.3;
|
||||
|
||||
// Point emission
|
||||
emitter[0] = BulletDirtSprayEmitter;
|
||||
emitter[1] = BulletDirtSprayEmitter;
|
||||
emitter[2] = BulletDirtRocksEmitter;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Shell ejected during reload.
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock DebrisData(BulletShell)
|
||||
{
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/shared/RifleShell.DAE";
|
||||
lifetime = 6.0;
|
||||
minSpinSpeed = 300.0;
|
||||
maxSpinSpeed = 400.0;
|
||||
elasticity = 0.65;
|
||||
friction = 0.05;
|
||||
numBounces = 5;
|
||||
staticOnMaxBounce = true;
|
||||
snapOnMaxBounce = false;
|
||||
ignoreWater = true;
|
||||
fade = true;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Projectile Object
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock LightDescription( BulletProjectileLightDesc )
|
||||
{
|
||||
color = "0.0 0.5 0.7";
|
||||
range = 3.0;
|
||||
};
|
||||
|
||||
datablock ProjectileData( BulletProjectile )
|
||||
{
|
||||
projectileShapeName = "";
|
||||
|
||||
directDamage = 5;
|
||||
radiusDamage = 0;
|
||||
damageRadius = 0.5;
|
||||
areaImpulse = 0.5;
|
||||
impactForce = 1;
|
||||
|
||||
explosion = BulletDirtExplosion;
|
||||
decal = BulletHoleDecal;
|
||||
|
||||
muzzleVelocity = 120;
|
||||
velInheritFactor = 1;
|
||||
|
||||
armingDelay = 0;
|
||||
lifetime = 992;
|
||||
fadeDelay = 1472;
|
||||
bounceElasticity = 0;
|
||||
bounceFriction = 0;
|
||||
isBallistic = false;
|
||||
gravityMod = 1;
|
||||
};
|
||||
|
||||
function BulletProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
|
||||
{
|
||||
// Apply impact force from the projectile.
|
||||
|
||||
// Apply damage to the object all shape base objects
|
||||
if ( %col.getType() & $TypeMasks::GameBaseObjectType )
|
||||
%col.damage(%obj,%pos,%this.directDamage,"BulletProjectile");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Ammo Item
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(LurkerClip)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "AmmoClip";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "AmmoClip";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Lurker clip";
|
||||
count = 1;
|
||||
maxInventory = 10;
|
||||
};
|
||||
|
||||
datablock ItemData(LurkerAmmo)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Ammo";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "Ammo";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Lurker ammo";
|
||||
maxInventory = 30;
|
||||
clip = LurkerClip;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon Item. This is the item that exists in the world, i.e. when it's
|
||||
// been dropped, thrown or is acting as re-spawnable item. When the weapon
|
||||
// is mounted onto a shape, the LurkerWeaponImage is used.
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(Lurker)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
// Hook into Item Weapon class hierarchy. The weapon namespace
|
||||
// provides common weapon handling functions in addition to hooks
|
||||
// into the inventory system.
|
||||
className = "Weapon";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
emap = true;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
PreviewImage = 'lurker.png';
|
||||
pickUpName = "Lurker rifle";
|
||||
description = "Lurker";
|
||||
image = LurkerWeaponImage;
|
||||
reticle = "crossHair";
|
||||
};
|
||||
|
||||
|
||||
datablock ShapeBaseImageData(LurkerWeaponImage)
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/Lurker/FP_Lurker.DAE";
|
||||
emap = true;
|
||||
|
||||
imageAnimPrefix = "Rifle";
|
||||
imageAnimPrefixFP = "Rifle";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
firstPerson = true;
|
||||
useEyeNode = true;
|
||||
animateOnServer = true;
|
||||
|
||||
// When firing from a point offset from the eye, muzzle correction
|
||||
// will adjust the muzzle vector to point to the eye LOS point.
|
||||
// Since this weapon doesn't actually fire from the muzzle point,
|
||||
// we need to turn this off.
|
||||
correctMuzzleVector = true;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = Lurker;
|
||||
ammo = LurkerAmmo;
|
||||
clip = LurkerClip;
|
||||
|
||||
projectile = BulletProjectile;
|
||||
projectileType = Projectile;
|
||||
projectileSpread = "0.005";
|
||||
|
||||
altProjectile = GrenadeLauncherProjectile;
|
||||
altProjectileSpread = "0.02";
|
||||
|
||||
casing = BulletShell;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
// Weapon lights up while firing
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.992126 0.968504 0.708661 1";
|
||||
lightRadius = "4";
|
||||
lightDuration = "100";
|
||||
lightBrightness = 2;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = false;
|
||||
camShakeFreq = "0 0 0";
|
||||
camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
useRemainderDT = true;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.5;
|
||||
stateSequence[1] = "switch_in";
|
||||
stateSound[1] = LurkerSwitchinSound;
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[2] = "ReadyFidget";
|
||||
stateTimeoutValue[2] = 10;
|
||||
stateWaitForTimeout[2] = false;
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Same as Ready state but plays a fidget sequence
|
||||
stateName[3] = "ReadyFidget";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnMotion[3] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[3] = "Ready";
|
||||
stateTimeoutValue[3] = 6;
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "idle_fidget1";
|
||||
stateSound[3] = LurkerIdleSound;
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[4] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[4] = "Ready";
|
||||
stateWaitForTimeout[4] = false;
|
||||
stateScaleAnimation[4] = false;
|
||||
stateScaleAnimationFP[4] = false;
|
||||
stateSequenceTransitionIn[4] = true;
|
||||
stateSequenceTransitionOut[4] = true;
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[4] = "Fire";
|
||||
stateSequence[4] = "run";
|
||||
|
||||
// Fire the weapon. Calls the fire script which does
|
||||
// the actual work.
|
||||
stateName[5] = "Fire";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTimeout[5] = "NewRound";
|
||||
stateTimeoutValue[5] = 0.15;
|
||||
stateFire[5] = true;
|
||||
stateRecoil[5] = "";
|
||||
stateAllowImageChange[5] = false;
|
||||
stateSequence[5] = "fire";
|
||||
stateScaleAnimation[5] = false;
|
||||
stateSequenceNeverTransition[5] = true;
|
||||
stateSequenceRandomFlash[5] = true; // use muzzle flash sequence
|
||||
stateScript[5] = "onFire";
|
||||
stateSound[5] = LurkerFireSoundList;
|
||||
stateEmitter[5] = GunFireSmokeEmitter;
|
||||
stateEmitterTime[5] = 0.025;
|
||||
|
||||
// Put another round into the chamber if one is available
|
||||
stateName[6] = "NewRound";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = "0";
|
||||
stateTimeoutValue[6] = 0.05;
|
||||
stateAllowImageChange[6] = false;
|
||||
stateEjectShell[6] = true;
|
||||
|
||||
// No ammo in the weapon, just idle until something
|
||||
// shows up. Play the dry fire sound if the trigger is
|
||||
// pulled.
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionGeneric0In[7] = "SprintEnter";
|
||||
stateTransitionOnMotion[7] = "NoAmmoMotion";
|
||||
stateTransitionOnAmmo[7] = "ReloadClip";
|
||||
stateTimeoutValue[7] = 0.1; // Slight pause to allow script to run when trigger is still held down from Fire state
|
||||
stateScript[7] = "onClipEmpty";
|
||||
stateSequence[7] = "idle";
|
||||
stateScaleAnimation[7] = false;
|
||||
stateScaleAnimationFP[7] = false;
|
||||
stateTransitionOnTriggerDown[7] = "DryFire";
|
||||
|
||||
stateName[8] = "NoAmmoMotion";
|
||||
stateTransitionGeneric0In[8] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[8] = "NoAmmo";
|
||||
stateWaitForTimeout[8] = false;
|
||||
stateScaleAnimation[8] = false;
|
||||
stateScaleAnimationFP[8] = false;
|
||||
stateSequenceTransitionIn[8] = true;
|
||||
stateSequenceTransitionOut[8] = true;
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
stateTransitionOnAmmo[8] = "ReloadClip";
|
||||
stateSequence[8] = "run";
|
||||
|
||||
// No ammo dry fire
|
||||
stateName[9] = "DryFire";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTransitionOnAmmo[9] = "ReloadClip";
|
||||
stateWaitForTimeout[9] = "0";
|
||||
stateTimeoutValue[9] = 0.7;
|
||||
stateTransitionOnTimeout[9] = "NoAmmo";
|
||||
stateScript[9] = "onDryFire";
|
||||
stateSound[9] = MachineGunDryFire;
|
||||
|
||||
// Play the reload clip animation
|
||||
stateName[10] = "ReloadClip";
|
||||
stateTransitionGeneric0In[10] = "SprintEnter";
|
||||
stateTransitionOnTimeout[10] = "Ready";
|
||||
stateWaitForTimeout[10] = true;
|
||||
stateTimeoutValue[10] = 3.0;
|
||||
stateReload[10] = true;
|
||||
stateSequence[10] = "reload";
|
||||
stateShapeSequence[10] = "Reload";
|
||||
stateScaleShapeSequence[10] = true;
|
||||
stateSound[10] = LurkerReloadSound;
|
||||
|
||||
// Start Sprinting
|
||||
stateName[11] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[11] = "SprintExit";
|
||||
stateTransitionOnTimeout[11] = "Sprinting";
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateTimeoutValue[11] = 0.5;
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateScaleAnimation[11] = false;
|
||||
stateScaleAnimationFP[11] = false;
|
||||
stateSequenceTransitionIn[11] = true;
|
||||
stateSequenceTransitionOut[11] = true;
|
||||
stateAllowImageChange[11] = false;
|
||||
stateSequence[11] = "sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[12] = "Sprinting";
|
||||
stateTransitionGeneric0Out[12] = "SprintExit";
|
||||
stateWaitForTimeout[12] = false;
|
||||
stateScaleAnimation[12] = false;
|
||||
stateScaleAnimationFP[12] = false;
|
||||
stateSequenceTransitionIn[12] = true;
|
||||
stateSequenceTransitionOut[12] = true;
|
||||
stateAllowImageChange[12] = false;
|
||||
stateSequence[12] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[13] = "SprintExit";
|
||||
stateTransitionGeneric0In[13] = "SprintEnter";
|
||||
stateTransitionOnTimeout[13] = "Ready";
|
||||
stateWaitForTimeout[13] = false;
|
||||
stateTimeoutValue[13] = 0.5;
|
||||
stateSequenceTransitionIn[13] = true;
|
||||
stateSequenceTransitionOut[13] = true;
|
||||
stateAllowImageChange[13] = false;
|
||||
stateSequence[13] = "sprint";
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Lurker Grenade Launcher
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ItemData(LurkerGrenadeAmmo)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Ammo";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "Ammo";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Lurker grenade ammo";
|
||||
maxInventory = 20;
|
||||
};
|
||||
|
||||
datablock ItemData(LurkerGrenadeLauncher)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
// Hook into Item Weapon class hierarchy. The weapon namespace
|
||||
// provides common weapon handling functions in addition to hooks
|
||||
// into the inventory system.
|
||||
className = "Weapon";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
emap = true;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
PreviewImage = 'lurker.png';
|
||||
pickUpName = "a Lurker grenade launcher";
|
||||
description = "Lurker Grenade Launcher";
|
||||
image = LurkerGrenadeLauncherImage;
|
||||
reticle = "crossHair";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(LurkerGrenadeLauncherImage)
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/Lurker/FP_Lurker.DAE";
|
||||
emap = true;
|
||||
|
||||
imageAnimPrefix = "Rifle";
|
||||
imageAnimPrefixFP = "Rifle";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
firstPerson = true;
|
||||
useEyeNode = true;
|
||||
animateOnServer = true;
|
||||
|
||||
// When firing from a point offset from the eye, muzzle correction
|
||||
// will adjust the muzzle vector to point to the eye LOS point.
|
||||
// Since this weapon doesn't actually fire from the muzzle point,
|
||||
// we need to turn this off.
|
||||
correctMuzzleVector = true;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = LurkerGrenadeLauncher;
|
||||
ammo = LurkerGrenadeAmmo;
|
||||
|
||||
projectile = GrenadeLauncherProjectile;
|
||||
projectileType = Projectile;
|
||||
projectileSpread = "0.02";
|
||||
|
||||
// Weapon lights up while firing
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.992126 0.968504 0.708661 1";
|
||||
lightRadius = "4";
|
||||
lightDuration = "100";
|
||||
lightBrightness = 2;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = false;
|
||||
camShakeFreq = "0 0 0";
|
||||
camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
useRemainderDT = true;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.5;
|
||||
stateSequence[1] = "switch_in";
|
||||
stateSound[1] = LurkerSwitchinSound;
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[2] = "ReadyFidget";
|
||||
stateTimeoutValue[2] = 10;
|
||||
stateWaitForTimeout[2] = false;
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Same as Ready state but plays a fidget sequence
|
||||
stateName[3] = "ReadyFidget";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnMotion[3] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[3] = "Ready";
|
||||
stateTimeoutValue[3] = 6;
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "idle_fidget1";
|
||||
stateSound[3] = LurkerIdleSound;
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[4] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[4] = "Ready";
|
||||
stateWaitForTimeout[4] = false;
|
||||
stateScaleAnimation[4] = false;
|
||||
stateScaleAnimationFP[4] = false;
|
||||
stateSequenceTransitionIn[4] = true;
|
||||
stateSequenceTransitionOut[4] = true;
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[4] = "Fire";
|
||||
stateSequence[4] = "run";
|
||||
|
||||
// Fire the weapon. Calls the fire script which does
|
||||
// the actual work.
|
||||
stateName[5] = "Fire";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTimeout[5] = "NewRound";
|
||||
stateTimeoutValue[5] = 1.2;
|
||||
stateFire[5] = true;
|
||||
stateRecoil[5] = "";
|
||||
stateAllowImageChange[5] = false;
|
||||
stateSequence[5] = "fire_alt";
|
||||
stateScaleAnimation[5] = true;
|
||||
stateSequenceNeverTransition[5] = true;
|
||||
stateSequenceRandomFlash[5] = true; // use muzzle flash sequence
|
||||
stateScript[5] = "onFire";
|
||||
stateSound[5] = LurkerGrenadeFireSound;
|
||||
stateEmitter[5] = GunFireSmokeEmitter;
|
||||
stateEmitterTime[5] = 0.025;
|
||||
stateEjectShell[5] = true;
|
||||
|
||||
// Put another round into the chamber
|
||||
stateName[6] = "NewRound";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = "0";
|
||||
stateTimeoutValue[6] = 0.05;
|
||||
stateAllowImageChange[6] = false;
|
||||
|
||||
// No ammo in the weapon, just idle until something
|
||||
// shows up. Play the dry fire sound if the trigger is
|
||||
// pulled.
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionGeneric0In[7] = "SprintEnter";
|
||||
stateTransitionOnMotion[7] = "NoAmmoReadyMotion";
|
||||
stateTransitionOnAmmo[7] = "ReloadClip";
|
||||
stateTimeoutValue[7] = 0.1; // Slight pause to allow script to run when trigger is still held down from Fire state
|
||||
stateScript[7] = "onClipEmpty";
|
||||
stateSequence[7] = "idle";
|
||||
stateScaleAnimation[7] = false;
|
||||
stateScaleAnimationFP[7] = false;
|
||||
stateTransitionOnTriggerDown[7] = "DryFire";
|
||||
|
||||
stateName[8] = "NoAmmoReadyMotion";
|
||||
stateTransitionGeneric0In[8] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[8] = "NoAmmo";
|
||||
stateWaitForTimeout[8] = false;
|
||||
stateScaleAnimation[8] = false;
|
||||
stateScaleAnimationFP[8] = false;
|
||||
stateSequenceTransitionIn[8] = true;
|
||||
stateSequenceTransitionOut[8] = true;
|
||||
stateTransitionOnAmmo[8] = "ReloadClip";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
stateSequence[8] = "run";
|
||||
|
||||
// No ammo dry fire
|
||||
stateName[9] = "DryFire";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTimeoutValue[9] = 1.0;
|
||||
stateTransitionOnTimeout[9] = "NoAmmo";
|
||||
stateScript[9] = "onDryFire";
|
||||
|
||||
// Play the reload clip animation
|
||||
stateName[10] = "ReloadClip";
|
||||
stateTransitionGeneric0In[10] = "SprintEnter";
|
||||
stateTransitionOnTimeout[10] = "Ready";
|
||||
stateWaitForTimeout[10] = true;
|
||||
stateTimeoutValue[10] = 3.0;
|
||||
stateReload[10] = true;
|
||||
stateSequence[10] = "reload";
|
||||
stateShapeSequence[10] = "Reload";
|
||||
stateScaleShapeSequence[10] = true;
|
||||
|
||||
// Start Sprinting
|
||||
stateName[11] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[11] = "SprintExit";
|
||||
stateTransitionOnTimeout[11] = "Sprinting";
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateTimeoutValue[11] = 0.5;
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateScaleAnimation[11] = false;
|
||||
stateScaleAnimationFP[11] = false;
|
||||
stateSequenceTransitionIn[11] = true;
|
||||
stateSequenceTransitionOut[11] = true;
|
||||
stateAllowImageChange[11] = false;
|
||||
stateSequence[11] = "sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[12] = "Sprinting";
|
||||
stateTransitionGeneric0Out[12] = "SprintExit";
|
||||
stateWaitForTimeout[12] = false;
|
||||
stateScaleAnimation[12] = false;
|
||||
stateScaleAnimationFP[12] = false;
|
||||
stateSequenceTransitionIn[12] = true;
|
||||
stateSequenceTransitionOut[12] = true;
|
||||
stateAllowImageChange[12] = false;
|
||||
stateSequence[12] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[13] = "SprintExit";
|
||||
stateTransitionGeneric0In[13] = "SprintEnter";
|
||||
stateTransitionOnTimeout[13] = "Ready";
|
||||
stateWaitForTimeout[13] = false;
|
||||
stateTimeoutValue[13] = 0.5;
|
||||
stateSequenceTransitionIn[13] = true;
|
||||
stateSequenceTransitionOut[13] = true;
|
||||
stateAllowImageChange[13] = false;
|
||||
stateSequence[13] = "sprint";
|
||||
};
|
||||
|
|
@ -0,0 +1,402 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Sounds
|
||||
//--------------------------------------------------------------------------
|
||||
// Added for Lesson 5 - Adding Weapons - 23 Sep 11
|
||||
datablock SFXProfile(WeaponTemplateFireSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_fire";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(WeaponTemplateReloadSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_reload";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(WeaponTemplateSwitchinSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(WeaponTemplateIdleSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_idle";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(WeaponTemplateGrenadeSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_grenadelaunch";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(WeaponTemplateMineSwitchinSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_mine_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
// Added 28 Sep 11
|
||||
datablock LightDescription( BulletProjectileLightDesc )
|
||||
{
|
||||
color = "0.0 0.5 0.7";
|
||||
range = 3.0;
|
||||
};
|
||||
|
||||
datablock ProjectileData( BulletProjectile )
|
||||
{
|
||||
projectileShapeName = "";
|
||||
|
||||
directDamage = 5;
|
||||
radiusDamage = 0;
|
||||
damageRadius = 0.5;
|
||||
areaImpulse = 0.5;
|
||||
impactForce = 1;
|
||||
|
||||
explosion = BulletDirtExplosion;
|
||||
decal = BulletHoleDecal;
|
||||
|
||||
muzzleVelocity = 120;
|
||||
velInheritFactor = 1;
|
||||
|
||||
armingDelay = 0;
|
||||
lifetime = 992;
|
||||
fadeDelay = 1472;
|
||||
bounceElasticity = 0;
|
||||
bounceFriction = 0;
|
||||
isBallistic = false;
|
||||
gravityMod = 1;
|
||||
};
|
||||
|
||||
function BulletProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
|
||||
{
|
||||
// Apply impact force from the projectile.
|
||||
|
||||
// Apply damage to the object all shape base objects
|
||||
if ( %col.getType() & $TypeMasks::GameBaseObjectType )
|
||||
%col.damage(%obj,%pos,%this.directDamage,"BulletProjectile");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock ProjectileData( WeaponTemplateProjectile )
|
||||
{
|
||||
projectileShapeName = "";
|
||||
|
||||
directDamage = 5;
|
||||
radiusDamage = 0;
|
||||
damageRadius = 0.5;
|
||||
areaImpulse = 0.5;
|
||||
impactForce = 1;
|
||||
|
||||
muzzleVelocity = 120;
|
||||
velInheritFactor = 1;
|
||||
|
||||
armingDelay = 0;
|
||||
lifetime = 992;
|
||||
fadeDelay = 1472;
|
||||
bounceElasticity = 0;
|
||||
bounceFriction = 0;
|
||||
isBallistic = false;
|
||||
gravityMod = 1;
|
||||
};
|
||||
|
||||
function WeaponTemplateProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
|
||||
{
|
||||
// Apply impact force from the projectile.
|
||||
|
||||
// Apply damage to the object all shape base objects
|
||||
if ( %col.getType() & $TypeMasks::GameBaseObjectType )
|
||||
%col.damage(%obj,%pos,%this.directDamage,"WeaponTemplateProjectile");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Ammo Item
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(WeaponTemplateAmmo)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Ammo";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "Ammo";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "";
|
||||
maxInventory = 1000;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon Item. This is the item that exists in the world, i.e. when it's
|
||||
// been dropped, thrown or is acting as re-spawnable item. When the weapon
|
||||
// is mounted onto a shape, the NewWeaponTemplate is used.
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(WeaponTemplateItem)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
// Hook into Item Weapon class hierarchy. The weapon namespace
|
||||
// provides common weapon handling functions in addition to hooks
|
||||
// into the inventory system.
|
||||
className = "Weapon";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
emap = true;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "A basic weapon";
|
||||
description = "Weapon";
|
||||
image = WeaponTemplateImage;
|
||||
reticle = "crossHair";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(WeaponTemplateImage)
|
||||
{
|
||||
// FP refers to first person specific features
|
||||
|
||||
// Defines what art file to use.
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Lurker/TP_Lurker.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/Lurker/FP_Lurker.DAE";
|
||||
|
||||
// Whether or not to enable environment mapping
|
||||
//emap = true;
|
||||
|
||||
//imageAnimPrefixFP = "";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
//firstPerson = true;
|
||||
//eyeOffset = "0.001 -0.05 -0.065";
|
||||
|
||||
// When firing from a point offset from the eye, muzzle correction
|
||||
// will adjust the muzzle vector to point to the eye LOS point.
|
||||
// Since this weapon doesn't actually fire from the muzzle point,
|
||||
// we need to turn this off.
|
||||
//correctMuzzleVector = true;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = WeaponTemplateItem;
|
||||
ammo = WeaponTemplateAmmo;
|
||||
|
||||
//projectile = BulletProjectile;
|
||||
//projectileType = Projectile;
|
||||
//projectileSpread = "0.005";
|
||||
|
||||
// Properties associated with the shell casing that gets ejected during firing
|
||||
//casing = BulletShell;
|
||||
//shellExitDir = "1.0 0.3 1.0";
|
||||
//shellExitOffset = "0.15 -0.56 -0.1";
|
||||
//shellExitVariance = 15.0;
|
||||
//shellVelocity = 3.0;
|
||||
|
||||
// Properties associated with a light that occurs when the weapon fires
|
||||
//lightType = "";
|
||||
//lightColor = "0.992126 0.968504 0.708661 1";
|
||||
//lightRadius = "4";
|
||||
//lightDuration = "100";
|
||||
//lightBrightness = 2;
|
||||
|
||||
// Properties associated with shaking the camera during firing
|
||||
//shakeCamera = false;
|
||||
//camShakeFreq = "0 0 0";
|
||||
//camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
// If true, allow multiple timeout transitions to occur within a single tick
|
||||
// useful if states have a very small timeout
|
||||
//useRemainderDT = true;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.5;
|
||||
stateSequence[1] = "switch_in";
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[2] = "ReadyFidget";
|
||||
stateTimeoutValue[2] = 10;
|
||||
stateWaitForTimeout[2] = false;
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Same as Ready state but plays a fidget sequence
|
||||
stateName[3] = "ReadyFidget";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnMotion[3] = "ReadyMotion";
|
||||
stateTransitionOnTimeout[3] = "Ready";
|
||||
stateTimeoutValue[3] = 6;
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "idle_fidget1";
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[4] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[4] = "Ready";
|
||||
stateWaitForTimeout[4] = false;
|
||||
stateScaleAnimation[4] = false;
|
||||
stateScaleAnimationFP[4] = false;
|
||||
stateSequenceTransitionIn[4] = true;
|
||||
stateSequenceTransitionOut[4] = true;
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[4] = "Fire";
|
||||
stateSequence[4] = "run";
|
||||
|
||||
// Fire the weapon. Calls the fire script which does
|
||||
// the actual work.
|
||||
stateName[5] = "Fire";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTimeout[5] = "Reload";
|
||||
stateTimeoutValue[5] = 0.15;
|
||||
stateFire[5] = true;
|
||||
stateRecoil[5] = "";
|
||||
stateAllowImageChange[5] = false;
|
||||
stateSequence[5] = "fire";
|
||||
stateScaleAnimation[5] = false;
|
||||
stateSequenceNeverTransition[5] = true;
|
||||
stateSequenceRandomFlash[5] = true; // use muzzle flash sequence
|
||||
stateScript[5] = "onFire";
|
||||
stateSound[5] = WeaponTemplateFireSound;
|
||||
stateEmitter[5] = GunFireSmokeEmitter;
|
||||
stateEmitterTime[5] = 0.025;
|
||||
|
||||
// Play the reload animation, and transition into
|
||||
stateName[6] = "Reload";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = "0";
|
||||
stateTimeoutValue[6] = 0.05;
|
||||
stateAllowImageChange[6] = false;
|
||||
//stateSequence[6] = "reload";
|
||||
stateEjectShell[6] = true;
|
||||
|
||||
// No ammo in the weapon, just idle until something
|
||||
// shows up. Play the dry fire sound if the trigger is
|
||||
// pulled.
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionGeneric0In[7] = "SprintEnter";
|
||||
stateTransitionOnAmmo[7] = "ReloadClip";
|
||||
stateScript[7] = "onClipEmpty";
|
||||
|
||||
// No ammo dry fire
|
||||
stateName[8] = "DryFire";
|
||||
stateTransitionGeneric0In[8] = "SprintEnter";
|
||||
stateTimeoutValue[8] = 1.0;
|
||||
stateTransitionOnTimeout[8] = "NoAmmo";
|
||||
stateScript[8] = "onDryFire";
|
||||
|
||||
// Play the reload clip animation
|
||||
stateName[9] = "ReloadClip";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTransitionOnTimeout[9] = "Ready";
|
||||
stateWaitForTimeout[9] = true;
|
||||
stateTimeoutValue[9] = 3.0;
|
||||
stateReload[9] = true;
|
||||
stateSequence[9] = "reload";
|
||||
stateShapeSequence[9] = "Reload";
|
||||
stateScaleShapeSequence[9] = true;
|
||||
|
||||
// Start Sprinting
|
||||
stateName[10] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[10] = "SprintExit";
|
||||
stateTransitionOnTimeout[10] = "Sprinting";
|
||||
stateWaitForTimeout[10] = false;
|
||||
stateTimeoutValue[10] = 0.5;
|
||||
stateWaitForTimeout[10] = false;
|
||||
stateScaleAnimation[10] = false;
|
||||
stateScaleAnimationFP[10] = false;
|
||||
stateSequenceTransitionIn[10] = true;
|
||||
stateSequenceTransitionOut[10] = true;
|
||||
stateAllowImageChange[10] = false;
|
||||
stateSequence[10] = "sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[11] = "Sprinting";
|
||||
stateTransitionGeneric0Out[11] = "SprintExit";
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateScaleAnimation[11] = false;
|
||||
stateScaleAnimationFP[11] = false;
|
||||
stateSequenceTransitionIn[11] = true;
|
||||
stateSequenceTransitionOut[11] = true;
|
||||
stateAllowImageChange[11] = false;
|
||||
stateSequence[11] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[12] = "SprintExit";
|
||||
stateTransitionGeneric0In[12] = "SprintEnter";
|
||||
stateTransitionOnTimeout[12] = "Ready";
|
||||
stateWaitForTimeout[12] = false;
|
||||
stateTimeoutValue[12] = 0.5;
|
||||
stateSequenceTransitionIn[12] = true;
|
||||
stateSequenceTransitionOut[12] = true;
|
||||
stateAllowImageChange[12] = false;
|
||||
stateSequence[12] = "sprint";
|
||||
};
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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( MineArmedSound )
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/mine_armed";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile( MineSwitchinSound )
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_proximitymine_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile( MineTriggeredSound )
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/mine_trigger";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock ProximityMineData( ProxMine )
|
||||
{
|
||||
// ShapeBaseData fields
|
||||
category = "Weapon";
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/ProxMine/TP_ProxMine.DAE";
|
||||
explosion = GrenadeLauncherExplosion;
|
||||
|
||||
// ItemData fields
|
||||
sticky = true;
|
||||
mass = 2;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
simpleServerCollision = false;
|
||||
|
||||
// ProximityMineData fields
|
||||
armingDelay = 3.5;
|
||||
armingSound = MineArmedSound;
|
||||
|
||||
autoTriggerDelay = 0;
|
||||
triggerOnOwner = true;
|
||||
triggerRadius = 3.0;
|
||||
triggerDelay = 0.45;
|
||||
triggerSound = MineTriggeredSound;
|
||||
|
||||
explosionOffset = 0.1;
|
||||
|
||||
// dynamic fields
|
||||
pickUpName = "a proximity mine";
|
||||
description = "Proximity Mine";
|
||||
maxInventory = 20;
|
||||
image = ProxMineImage;
|
||||
|
||||
previewImage = 'mine.png';
|
||||
reticle = 'blank';
|
||||
zoomReticle = 'blank';
|
||||
|
||||
damageType = "MineDamage"; // type of damage applied to objects in radius
|
||||
radiusDamage = 300; // amount of damage to apply to objects in radius
|
||||
damageRadius = 8; // search radius to damage objects when exploding
|
||||
areaImpulse = 2000; // magnitude of impulse to apply to objects in radius
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData( ProxMineImage )
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/ProxMine/TP_ProxMine.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/ProxMine/FP_ProxMine.DAE";
|
||||
|
||||
imageAnimPrefix = "ProxMine";
|
||||
imageAnimPrefixFP = "ProxMine";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
firstPerson = true;
|
||||
useEyeNode = true;
|
||||
|
||||
// When firing from a point offset from the eye, muzzle correction
|
||||
// will adjust the muzzle vector to point to the eye LOS point.
|
||||
// Since this weapon doesn't actually fire from the muzzle point,
|
||||
// we need to turn this off.
|
||||
correctMuzzleVector = false;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = ProxMine;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = false;
|
||||
camShakeFreq = "0 0 0";
|
||||
camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "Activate";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 3.0;
|
||||
stateSequence[1] = "switch_in";
|
||||
stateShapeSequence[1] = "Reload";
|
||||
stateSound[1] = MineSwitchinSound;
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[3] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[3] = "Ready";
|
||||
stateScaleAnimation[3] = false;
|
||||
stateScaleAnimationFP[3] = false;
|
||||
stateSequenceTransitionIn[3] = true;
|
||||
stateSequenceTransitionOut[3] = true;
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "run";
|
||||
|
||||
// Wind up to throw the ProxMine
|
||||
stateName[4] = "Fire";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnTimeout[4] = "Fire2";
|
||||
stateTimeoutValue[4] = 0.8;
|
||||
stateFire[4] = true;
|
||||
stateRecoil[4] = "";
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Fire";
|
||||
stateSequenceNeverTransition[4] = true;
|
||||
stateShapeSequence[4] = "Fire";
|
||||
|
||||
// Throw the actual mine
|
||||
stateName[5] = "Fire2";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTriggerUp[5] = "Reload";
|
||||
stateTimeoutValue[5] = 0.7;
|
||||
stateAllowImageChange[5] = false;
|
||||
stateSequenceNeverTransition[5] = true;
|
||||
stateSequence[5] = "fire_release";
|
||||
stateShapeSequence[5] = "Fire_Release";
|
||||
stateScript[5] = "onFire";
|
||||
|
||||
// Play the reload animation, and transition into
|
||||
stateName[6] = "Reload";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = true;
|
||||
stateTimeoutValue[6] = 3.0;
|
||||
stateSequence[6] = "switch_in";
|
||||
stateShapeSequence[6] = "Reload";
|
||||
stateSound[6] = MineSwitchinSound;
|
||||
|
||||
// Start Sprinting
|
||||
stateName[7] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[7] = "SprintExit";
|
||||
stateTransitionOnTimeout[7] = "Sprinting";
|
||||
stateWaitForTimeout[7] = false;
|
||||
stateTimeoutValue[7] = 0.25;
|
||||
stateWaitForTimeout[7] = false;
|
||||
stateScaleAnimation[7] = true;
|
||||
stateScaleAnimationFP[7] = true;
|
||||
stateSequenceTransitionIn[7] = true;
|
||||
stateSequenceTransitionOut[7] = true;
|
||||
stateAllowImageChange[7] = false;
|
||||
stateSequence[7] = "run2sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[8] = "Sprinting";
|
||||
stateTransitionGeneric0Out[8] = "SprintExit";
|
||||
stateWaitForTimeout[8] = false;
|
||||
stateScaleAnimation[8] = false;
|
||||
stateScaleAnimationFP[8] = false;
|
||||
stateSequenceTransitionIn[8] = true;
|
||||
stateSequenceTransitionOut[8] = true;
|
||||
stateAllowImageChange[8] = false;
|
||||
stateSequence[8] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[9] = "SprintExit";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTransitionOnTimeout[9] = "Ready";
|
||||
stateWaitForTimeout[9] = false;
|
||||
stateTimeoutValue[9] = 0.5;
|
||||
stateSequenceTransitionIn[9] = true;
|
||||
stateSequenceTransitionOut[9] = true;
|
||||
stateAllowImageChange[9] = false;
|
||||
stateSequence[9] = "sprint2run";
|
||||
};
|
||||
|
|
@ -0,0 +1,365 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Sounds
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock SFXProfile(RyderFireSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_ryder_fire";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(RyderReloadSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_ryder_reload";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(RyderSwitchinSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/wpn_ryder_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Particles
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Explosion
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Shell ejected during reload.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Projectile Object
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Ammo Item
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(RyderClip)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "AmmoClip";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "AmmoClip";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Ryder/TP_Ryder.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Ryder clip";
|
||||
count = 1;
|
||||
maxInventory = 10;
|
||||
};
|
||||
|
||||
datablock ItemData(RyderAmmo)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Ammo";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "Ammo";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Ryder/TP_Ryder.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Ryder bullet";
|
||||
maxInventory = 8;
|
||||
clip = RyderClip;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon Item. This is the item that exists in the world, i.e. when it's
|
||||
// been dropped, thrown or is acting as re-spawnable item. When the weapon
|
||||
// is mounted onto a shape, the SoldierWeaponImage is used.
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock ItemData(Ryder)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
// Hook into Item Weapon class hierarchy. The weapon namespace
|
||||
// provides common weapon handling functions in addition to hooks
|
||||
// into the inventory system.
|
||||
className = "Weapon";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Ryder/TP_Ryder.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
emap = true;
|
||||
PreviewImage = 'ryder.png';
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "Ryder pistol";
|
||||
description = "Ryder";
|
||||
image = RyderWeaponImage;
|
||||
reticle = "crossHair";
|
||||
};
|
||||
|
||||
|
||||
datablock ShapeBaseImageData(RyderWeaponImage)
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Ryder/TP_Ryder.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/Ryder/FP_Ryder.DAE";
|
||||
emap = true;
|
||||
|
||||
imageAnimPrefix = "Pistol";
|
||||
imageAnimPrefixFP = "Pistol";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
firstPerson = true;
|
||||
useEyeNode = true;
|
||||
animateOnServer = true;
|
||||
|
||||
// When firing from a point offset from the eye, muzzle correction
|
||||
// will adjust the muzzle vector to point to the eye LOS point.
|
||||
// Since this weapon doesn't actually fire from the muzzle point,
|
||||
// we need to turn this off.
|
||||
correctMuzzleVector = true;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = Ryder;
|
||||
ammo = RyderAmmo;
|
||||
clip = RyderClip;
|
||||
|
||||
projectile = BulletProjectile;
|
||||
projectileType = Projectile;
|
||||
projectileSpread = "0.0";
|
||||
|
||||
altProjectile = GrenadeLauncherProjectile;
|
||||
altProjectileSpread = "0.02";
|
||||
|
||||
casing = BulletShell;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
// Weapon lights up while firing
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.992126 0.968504 0.700787 1";
|
||||
lightRadius = "4";
|
||||
lightDuration = "100";
|
||||
lightBrightness = 2;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = "1";
|
||||
camShakeFreq = "10 10 10";
|
||||
camShakeAmp = "5 5 5";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
useRemainderDT = true;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 1.5;
|
||||
stateSequence[1] = "switch_in";
|
||||
stateSound[1] = RyderSwitchinSound;
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[3] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[3] = "Ready";
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateScaleAnimation[3] = false;
|
||||
stateScaleAnimationFP[3] = false;
|
||||
stateSequenceTransitionIn[3] = true;
|
||||
stateSequenceTransitionOut[3] = true;
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "run";
|
||||
|
||||
// Fire the weapon. Calls the fire script which does
|
||||
// the actual work.
|
||||
stateName[4] = "Fire";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnTimeout[4] = "WaitForRelease";
|
||||
stateTimeoutValue[4] = 0.23;
|
||||
stateWaitForTimeout[4] = true;
|
||||
stateFire[4] = true;
|
||||
stateRecoil[4] = "";
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "fire";
|
||||
stateScaleAnimation[4] = true;
|
||||
stateSequenceNeverTransition[4] = true;
|
||||
stateSequenceRandomFlash[4] = true; // use muzzle flash sequence
|
||||
stateScript[4] = "onFire";
|
||||
stateEmitter[4] = GunFireSmokeEmitter;
|
||||
stateEmitterTime[4] = 0.025;
|
||||
stateEjectShell[4] = true;
|
||||
stateSound[4] = RyderFireSound;
|
||||
|
||||
// Wait for the player to release the trigger
|
||||
stateName[5] = "WaitForRelease";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTriggerUp[5] = "NewRound";
|
||||
stateTimeoutValue[5] = 0.05;
|
||||
stateWaitForTimeout[5] = true;
|
||||
stateAllowImageChange[5] = false;
|
||||
|
||||
// Put another round in the chamber
|
||||
stateName[6] = "NewRound";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = "0";
|
||||
stateTimeoutValue[6] = 0.05;
|
||||
stateAllowImageChange[6] = false;
|
||||
|
||||
// No ammo in the weapon, just idle until something
|
||||
// shows up. Play the dry fire sound if the trigger is
|
||||
// pulled.
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionGeneric0In[7] = "SprintEnter";
|
||||
stateTransitionOnMotion[7] = "NoAmmoMotion";
|
||||
stateTransitionOnAmmo[7] = "ReloadClip";
|
||||
stateTimeoutValue[7] = 0.1; // Slight pause to allow script to run when trigger is still held down from Fire state
|
||||
stateScript[7] = "onClipEmpty";
|
||||
stateTransitionOnTriggerDown[7] = "DryFire";
|
||||
stateSequence[7] = "idle";
|
||||
stateScaleAnimation[7] = false;
|
||||
stateScaleAnimationFP[7] = false;
|
||||
|
||||
stateName[8] = "NoAmmoMotion";
|
||||
stateTransitionGeneric0In[8] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[8] = "NoAmmo";
|
||||
stateWaitForTimeout[8] = false;
|
||||
stateScaleAnimation[8] = false;
|
||||
stateScaleAnimationFP[8] = false;
|
||||
stateSequenceTransitionIn[8] = true;
|
||||
stateSequenceTransitionOut[8] = true;
|
||||
stateTransitionOnAmmo[8] = "ReloadClip";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
stateSequence[8] = "run";
|
||||
|
||||
// No ammo dry fire
|
||||
stateName[9] = "DryFire";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTransitionOnAmmo[9] = "ReloadClip";
|
||||
stateWaitForTimeout[9] = "0";
|
||||
stateTimeoutValue[9] = 0.7;
|
||||
stateTransitionOnTimeout[9] = "NoAmmo";
|
||||
stateScript[9] = "onDryFire";
|
||||
|
||||
// Play the reload clip animation
|
||||
stateName[10] = "ReloadClip";
|
||||
stateTransitionGeneric0In[10] = "SprintEnter";
|
||||
stateTransitionOnTimeout[10] = "Ready";
|
||||
stateWaitForTimeout[10] = true;
|
||||
stateTimeoutValue[10] = 2.0;
|
||||
stateReload[10] = true;
|
||||
stateSequence[10] = "reload";
|
||||
stateShapeSequence[10] = "Reload";
|
||||
stateScaleShapeSequence[10] = true;
|
||||
stateSound[10] = RyderReloadSound;
|
||||
|
||||
// Start Sprinting
|
||||
stateName[11] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[11] = "SprintExit";
|
||||
stateTransitionOnTimeout[11] = "Sprinting";
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateTimeoutValue[11] = 0.5;
|
||||
stateWaitForTimeout[11] = false;
|
||||
stateScaleAnimation[11] = false;
|
||||
stateScaleAnimationFP[11] = false;
|
||||
stateSequenceTransitionIn[11] = true;
|
||||
stateSequenceTransitionOut[11] = true;
|
||||
stateAllowImageChange[11] = false;
|
||||
stateSequence[11] = "sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[12] = "Sprinting";
|
||||
stateTransitionGeneric0Out[12] = "SprintExit";
|
||||
stateWaitForTimeout[12] = false;
|
||||
stateScaleAnimation[12] = false;
|
||||
stateScaleAnimationFP[12] = false;
|
||||
stateSequenceTransitionIn[12] = true;
|
||||
stateSequenceTransitionOut[12] = true;
|
||||
stateAllowImageChange[12] = false;
|
||||
stateSequence[12] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[13] = "SprintExit";
|
||||
stateTransitionGeneric0In[13] = "SprintEnter";
|
||||
stateTransitionOnTimeout[13] = "Ready";
|
||||
stateWaitForTimeout[13] = false;
|
||||
stateTimeoutValue[13] = 0.5;
|
||||
stateSequenceTransitionIn[13] = true;
|
||||
stateSequenceTransitionOut[13] = true;
|
||||
stateAllowImageChange[13] = false;
|
||||
stateSequence[13] = "sprint";
|
||||
camShakeDuration = "0.2";
|
||||
};
|
||||
|
|
@ -0,0 +1,559 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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(TargetAquiredSound)
|
||||
{
|
||||
filename = "";
|
||||
description = AudioClose3D;
|
||||
preload = false;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TargetLostSound)
|
||||
{
|
||||
filename = "";
|
||||
description = AudioClose3D;
|
||||
preload = false;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretDestroyed)
|
||||
{
|
||||
filename = "";
|
||||
description = AudioClose3D;
|
||||
preload = false;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretThrown)
|
||||
{
|
||||
filename = "";
|
||||
description = AudioClose3D;
|
||||
preload = false;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretFireSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/turret/wpn_turret_fire";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretActivatedSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/turret/wpn_turret_deploy";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretScanningSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/turret/wpn_turret_scan";
|
||||
description = AudioCloseLoop3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(TurretSwitchinSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/turret/wpn_turret_switchin";
|
||||
description = AudioClose3D;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Turret Bullet Projectile
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock ProjectileData( TurretBulletProjectile )
|
||||
{
|
||||
projectileShapeName = "";
|
||||
|
||||
directDamage = 5;
|
||||
radiusDamage = 0;
|
||||
damageRadius = 0.5;
|
||||
areaImpulse = 0.5;
|
||||
impactForce = 1;
|
||||
|
||||
damageType = "TurretDamage"; // Type of damage applied by this weapon
|
||||
|
||||
explosion = BulletDirtExplosion;
|
||||
decal = BulletHoleDecal;
|
||||
|
||||
muzzleVelocity = 120;
|
||||
velInheritFactor = 1;
|
||||
|
||||
armingDelay = 0;
|
||||
lifetime = 992;
|
||||
fadeDelay = 1472;
|
||||
bounceElasticity = 0;
|
||||
bounceFriction = 0;
|
||||
isBallistic = false;
|
||||
gravityMod = 1;
|
||||
};
|
||||
|
||||
function TurretBulletProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
|
||||
{
|
||||
// Apply impact force from the projectile.
|
||||
|
||||
// Apply damage to the object all shape base objects
|
||||
if ( %col.getType() & $TypeMasks::GameBaseObjectType )
|
||||
%col.damage(%obj,%pos,%this.directDamage,%this.damageType);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Turret Bullet Ammo
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock ItemData(AITurretAmmo)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Ammo";
|
||||
|
||||
// Add the Ammo namespace as a parent. The ammo namespace provides
|
||||
// common ammo related functions and hooks into the inventory system.
|
||||
className = "Ammo";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Turret/Turret_Legs.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "turret ammo";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// AI Turret Weapon
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock ItemData(AITurretHead)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
// Hook into Item Weapon class hierarchy. The weapon namespace
|
||||
// provides common weapon handling functions in addition to hooks
|
||||
// into the inventory system.
|
||||
className = "Weapon";
|
||||
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Turret/Turret_Head.DAE";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
emap = true;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
pickUpName = "an AI turret head";
|
||||
description = "AI Turret Head";
|
||||
image = AITurretHeadImage;
|
||||
reticle = "crossHair";
|
||||
};
|
||||
datablock ShapeBaseImageData(AITurretHeadImage)
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Turret/Turret_Head.DAE";
|
||||
emap = true;
|
||||
|
||||
// Specify mount point
|
||||
mountPoint = 0;
|
||||
|
||||
// Add the WeaponImage namespace as a parent, WeaponImage namespace
|
||||
// provides some hooks into the inventory system.
|
||||
class = "WeaponImage";
|
||||
className = "WeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = AITurretHead;
|
||||
ammo = AITurretAmmo;
|
||||
|
||||
projectile = TurretBulletProjectile;
|
||||
projectileType = Projectile;
|
||||
projectileSpread = "0.02";
|
||||
|
||||
casing = BulletShell;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
// Weapon lights up while firing
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.992126 0.968504 0.708661 1";
|
||||
lightRadius = "4";
|
||||
lightDuration = "100";
|
||||
lightBrightness = 2;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = false;
|
||||
camShakeFreq = "0 0 0";
|
||||
camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
useRemainderDT = true;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateIgnoreLoadedForReady[0] = false;
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "WaitingDeployment"; // If the turret weapon is not loaded then it has not yet been deployed
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "Destroyed";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.5;
|
||||
stateSequence[1] = "Activate";
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "Destroyed";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "scan";
|
||||
|
||||
// Fire the weapon. Calls the fire script which does
|
||||
// the actual work.
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionGeneric0In[3] = "Destroyed";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.2;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = "LightRecoil";
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "fire";
|
||||
stateSequenceRandomFlash[3] = true; // use muzzle flash sequence
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = TurretFireSound;
|
||||
stateEmitter[3] = GunFireSmokeEmitter;
|
||||
stateEmitterTime[3] = 0.025;
|
||||
stateEjectShell[3] = true;
|
||||
|
||||
// Play the reload animation, and transition into
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionGeneric0In[4] = "Destroyed";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateWaitForTimeout[4] = "0";
|
||||
stateTimeoutValue[4] = 0.0;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
// No ammo in the weapon, just idle until something
|
||||
// shows up. Play the dry fire sound if the trigger is
|
||||
// pulled.
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionGeneric0In[5] = "Destroyed";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
// No ammo dry fire
|
||||
stateName[6] = "DryFire";
|
||||
stateTransitionGeneric0In[6] = "Destroyed";
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
stateScript[6] = "onDryFire";
|
||||
|
||||
// Waiting for the turret to be deployed
|
||||
stateName[7] = "WaitingDeployment";
|
||||
stateTransitionGeneric0In[7] = "Destroyed";
|
||||
stateTransitionOnLoaded[7] = "Deployed";
|
||||
stateSequence[7] = "wait_deploy";
|
||||
|
||||
// Turret has been deployed
|
||||
stateName[8] = "Deployed";
|
||||
stateTransitionGeneric0In[8] = "Destroyed";
|
||||
stateTransitionOnTimeout[8] = "Ready";
|
||||
stateWaitForTimeout[8] = true;
|
||||
stateTimeoutValue[8] = 2.5; // Same length as turret base's Deploy state
|
||||
stateSequence[8] = "deploy";
|
||||
|
||||
// Turret has been destroyed
|
||||
stateName[9] = "Destroyed";
|
||||
stateSequence[9] = "destroyed";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// AI Turret
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock AITurretShapeData(AITurret)
|
||||
{
|
||||
category = "Turrets";
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Turret/Turret_Legs.DAE";
|
||||
|
||||
maxDamage = 70;
|
||||
destroyedLevel = 70;
|
||||
explosion = GrenadeExplosion;
|
||||
|
||||
simpleServerCollision = false;
|
||||
|
||||
zRotOnly = false;
|
||||
|
||||
// Rotation settings
|
||||
minPitch = 15;
|
||||
maxPitch = 80;
|
||||
maxHeading = 90;
|
||||
headingRate = 50;
|
||||
pitchRate = 50;
|
||||
|
||||
// Scan settings
|
||||
maxScanPitch = 10;
|
||||
maxScanHeading = 30;
|
||||
maxScanDistance = 20;
|
||||
trackLostTargetTime = 2;
|
||||
|
||||
maxWeaponRange = 30;
|
||||
|
||||
weaponLeadVelocity = 0;
|
||||
|
||||
// Weapon mounting
|
||||
numWeaponMountPoints = 1;
|
||||
|
||||
weapon[0] = AITurretHead;
|
||||
weaponAmmo[0] = AITurretAmmo;
|
||||
weaponAmmoAmount[0] = 10000;
|
||||
|
||||
maxInv[AITurretHead] = 1;
|
||||
maxInv[AITurretAmmo] = 10000;
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnAtRest[0] = "Scanning";
|
||||
stateTransitionOnNotAtRest[0] = "Thrown";
|
||||
|
||||
// Scan for targets
|
||||
stateName[1] = "Scanning";
|
||||
stateScan[1] = true;
|
||||
stateTransitionOnTarget[1] = "Target";
|
||||
stateSequence[1] = "scan";
|
||||
stateScript[1] = "OnScanning";
|
||||
|
||||
// Have a target
|
||||
stateName[2] = "Target";
|
||||
stateTransitionOnNoTarget[2] = "NoTarget";
|
||||
stateTransitionOnTimeout[2] = "Firing";
|
||||
stateTimeoutValue[2] = 2.0;
|
||||
stateScript[2] = "OnTarget";
|
||||
|
||||
// Fire at target
|
||||
stateName[3] = "Firing";
|
||||
stateFire[3] = true;
|
||||
stateTransitionOnNoTarget[3] = "NoTarget";
|
||||
stateScript[3] = "OnFiring";
|
||||
|
||||
// Lost target
|
||||
stateName[4] = "NoTarget";
|
||||
stateTransitionOnTimeout[4] = "Scanning";
|
||||
stateTimeoutValue[4] = 2.0;
|
||||
stateScript[4] = "OnNoTarget";
|
||||
|
||||
// Player thrown turret
|
||||
stateName[5] = "Thrown";
|
||||
stateTransitionOnAtRest[5] = "Deploy";
|
||||
stateSequence[5] = "throw";
|
||||
stateScript[5] = "OnThrown";
|
||||
|
||||
// Player thrown turret is deploying
|
||||
stateName[6] = "Deploy";
|
||||
stateTransitionOnTimeout[6] = "Scanning";
|
||||
stateTimeoutValue[6] = 2.5;
|
||||
stateSequence[6] = "deploy";
|
||||
stateScaleAnimation[6] = true;
|
||||
stateScript[6] = "OnDeploy";
|
||||
|
||||
// Special state that is set when the turret is destroyed.
|
||||
// This state is set in the onDestroyed() callback.
|
||||
stateName[7] = "Destroyed";
|
||||
stateSequence[7] = "destroyed";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Deployable AI Turret
|
||||
//-----------------------------------------------------------------------------
|
||||
datablock AITurretShapeData(DeployableTurret : AITurret)
|
||||
{
|
||||
// Mission editor category
|
||||
category = "Weapon";
|
||||
|
||||
className = "DeployableTurretWeapon";
|
||||
|
||||
startLoaded = false;
|
||||
|
||||
// Basic Item properties
|
||||
mass = 1.5;
|
||||
elasticity = 0.1;
|
||||
friction = 0.6;
|
||||
simpleServerCollision = false;
|
||||
|
||||
// Dynamic properties defined by the scripts
|
||||
PreviewImage = 'turret.png';
|
||||
pickUpName = "a deployable turret";
|
||||
description = "Deployable Turret";
|
||||
image = DeployableTurretImage;
|
||||
reticle = "blank";
|
||||
zoomReticle = 'blank';
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(DeployableTurretImage)
|
||||
{
|
||||
// Basic Item properties
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Turret/TP_Turret.DAE";
|
||||
shapeFileFP = "data/FPSGameplay/art/shapes/weapons/Turret/FP_Turret.DAE";
|
||||
emap = true;
|
||||
|
||||
imageAnimPrefix = "Turret";
|
||||
imageAnimPrefixFP = "Turret";
|
||||
|
||||
// Specify mount point & offset for 3rd person, and eye offset
|
||||
// for first person rendering.
|
||||
mountPoint = 0;
|
||||
firstPerson = true;
|
||||
useEyeNode = true;
|
||||
|
||||
// Don't allow a player to sprint with a turret
|
||||
sprintDisallowed = true;
|
||||
|
||||
class = "DeployableTurretWeaponImage";
|
||||
className = "DeployableTurretWeaponImage";
|
||||
|
||||
// Projectiles and Ammo.
|
||||
item = DeployableTurret;
|
||||
|
||||
// Shake camera while firing.
|
||||
shakeCamera = false;
|
||||
camShakeFreq = "0 0 0";
|
||||
camShakeAmp = "0 0 0";
|
||||
|
||||
// Images have a state system which controls how the animations
|
||||
// are run, which sounds are played, script callbacks, etc. This
|
||||
// state system is downloaded to the client so that clients can
|
||||
// predict state changes and animate accordingly. The following
|
||||
// system supports basic ready->fire->reload transitions as
|
||||
// well as a no-ammo->dryfire idle state.
|
||||
|
||||
// Initial start up state
|
||||
stateName[0] = "Preactivate";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "Activate";
|
||||
|
||||
// Activating the gun. Called when the weapon is first
|
||||
// mounted and there is ammo.
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionGeneric0In[1] = "SprintEnter";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.66;
|
||||
stateSequence[1] = "switch_in";
|
||||
stateSound[1] = TurretSwitchinSound;
|
||||
|
||||
// Ready to fire, just waiting for the trigger
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionGeneric0In[2] = "SprintEnter";
|
||||
stateTransitionOnMotion[2] = "ReadyMotion";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateScaleAnimation[2] = false;
|
||||
stateScaleAnimationFP[2] = false;
|
||||
stateSequence[2] = "idle";
|
||||
|
||||
// Ready to fire with player moving
|
||||
stateName[3] = "ReadyMotion";
|
||||
stateTransitionGeneric0In[3] = "SprintEnter";
|
||||
stateTransitionOnNoMotion[3] = "Ready";
|
||||
stateScaleAnimation[3] = false;
|
||||
stateScaleAnimationFP[3] = false;
|
||||
stateSequenceTransitionIn[3] = true;
|
||||
stateSequenceTransitionOut[3] = true;
|
||||
stateTransitionOnTriggerDown[3] = "Fire";
|
||||
stateSequence[3] = "run";
|
||||
|
||||
// Wind up to throw the Turret
|
||||
stateName[4] = "Fire";
|
||||
stateTransitionGeneric0In[4] = "SprintEnter";
|
||||
stateTransitionOnTimeout[4] = "Fire2";
|
||||
stateTimeoutValue[4] = 0.66;
|
||||
stateFire[4] = true;
|
||||
stateRecoil[4] = "";
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Fire";
|
||||
stateSequenceNeverTransition[4] = true;
|
||||
stateShapeSequence[4] = "Recoil";
|
||||
|
||||
// Throw the actual Turret
|
||||
stateName[5] = "Fire2";
|
||||
stateTransitionGeneric0In[5] = "SprintEnter";
|
||||
stateTransitionOnTriggerUp[5] = "Reload";
|
||||
stateTimeoutValue[5] = 0.1;
|
||||
stateAllowImageChange[5] = false;
|
||||
stateScript[5] = "onFire";
|
||||
stateShapeSequence[5] = "Fire_Release";
|
||||
|
||||
// Play the reload animation, and transition into
|
||||
stateName[6] = "Reload";
|
||||
stateTransitionGeneric0In[6] = "SprintEnter";
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
stateWaitForTimeout[6] = true;
|
||||
stateTimeoutValue[6] = 0.66;
|
||||
stateSequence[6] = "switch_in";
|
||||
|
||||
// Start Sprinting
|
||||
stateName[7] = "SprintEnter";
|
||||
stateTransitionGeneric0Out[7] = "SprintExit";
|
||||
stateTransitionOnTimeout[7] = "Sprinting";
|
||||
stateWaitForTimeout[7] = false;
|
||||
stateTimeoutValue[7] = 0.25;
|
||||
stateWaitForTimeout[7] = false;
|
||||
stateScaleAnimation[7] = true;
|
||||
stateScaleAnimationFP[7] = true;
|
||||
stateSequenceTransitionIn[7] = true;
|
||||
stateSequenceTransitionOut[7] = true;
|
||||
stateAllowImageChange[7] = false;
|
||||
stateSequence[7] = "sprint";
|
||||
|
||||
// Sprinting
|
||||
stateName[8] = "Sprinting";
|
||||
stateTransitionGeneric0Out[8] = "SprintExit";
|
||||
stateWaitForTimeout[8] = false;
|
||||
stateScaleAnimation[8] = false;
|
||||
stateScaleAnimationFP[8] = false;
|
||||
stateSequenceTransitionIn[8] = true;
|
||||
stateSequenceTransitionOut[8] = true;
|
||||
stateAllowImageChange[8] = false;
|
||||
stateSequence[8] = "sprint";
|
||||
|
||||
// Stop Sprinting
|
||||
stateName[9] = "SprintExit";
|
||||
stateTransitionGeneric0In[9] = "SprintEnter";
|
||||
stateTransitionOnTimeout[9] = "Ready";
|
||||
stateWaitForTimeout[9] = false;
|
||||
stateTimeoutValue[9] = 0.5;
|
||||
stateSequenceTransitionIn[9] = true;
|
||||
stateSequenceTransitionOut[9] = true;
|
||||
stateAllowImageChange[9] = false;
|
||||
stateSequence[9] = "sprint";
|
||||
};
|
||||
|
|
@ -0,0 +1,917 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque
|
||||
// Copyright GarageGames, LLC 2011
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Placeholder projectile and explosion with required sounds, debris, and
|
||||
// particle datablocks. These datablocks existed in now removed scripts, but
|
||||
// were used within some that remain: see Lurker.cs, Ryder.cs, ProxMine.cs
|
||||
//
|
||||
// These effects should be made more generic or new fx created for unique usage.
|
||||
//
|
||||
// I've removed all effects that are not required for the current weapons. On
|
||||
// reflection I really went overboard when originally making these effects!
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
$GrenadeUpVectorOffset = "0 0 1";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Sounds
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
datablock SFXProfile(GrenadeExplosionSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/GRENADELAND.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock SFXProfile(GrenadeLauncherExplosionSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/Crossbow_explosion";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Lights for the projectile(s)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock LightDescription(GrenadeLauncherLightDesc)
|
||||
{
|
||||
range = 1.0;
|
||||
color = "1 1 1";
|
||||
brightness = 2.0;
|
||||
animationType = PulseLightAnim;
|
||||
animationPeriod = 0.25;
|
||||
//flareType = SimpleLightFlare0;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Debris
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GrenadeDebrisFireParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/impact";
|
||||
dragCoeffiecient = 0;
|
||||
gravityCoefficient = -1.00366;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 300;
|
||||
lifetimeVarianceMS = 100;
|
||||
useInvAlpha = false;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -280.0;
|
||||
spinRandomMax = 280.0;
|
||||
colors[0] = "1 0.590551 0.188976 0.0944882";
|
||||
colors[1] = "0.677165 0.590551 0.511811 0.496063";
|
||||
colors[2] = "0.645669 0.645669 0.645669 0";
|
||||
sizes[0] = 0.2;
|
||||
sizes[1] = 0.5;
|
||||
sizes[2] = 0.2;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.494118;
|
||||
times[2] = 1.0;
|
||||
animTexName = "data/FPSGameplay/art/particles/impact";
|
||||
colors[3] = "1 1 1 0.407";
|
||||
sizes[3] = "0.5";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeDebrisFireEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 0;
|
||||
velocityVariance = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 25;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
ejectionoffset = 0.3;
|
||||
particles = "GrenadeDebrisFireParticle";
|
||||
orientParticles = "1";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
datablock DebrisData(GrenadeDebris)
|
||||
{
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/Grenade/grenadeDebris.dae";
|
||||
emitters[0] = GrenadeDebrisFireEmitter;
|
||||
elasticity = 0.4;
|
||||
friction = 0.25;
|
||||
numBounces = 3;
|
||||
bounceVariance = 1;
|
||||
explodeOnMaxBounce = false;
|
||||
staticOnMaxBounce = false;
|
||||
snapOnMaxBounce = false;
|
||||
minSpinSpeed = 200;
|
||||
maxSpinSpeed = 600;
|
||||
render2D = false;
|
||||
lifetime = 4;
|
||||
lifetimeVariance = 1.5;
|
||||
velocity = 15;
|
||||
velocityVariance = 5;
|
||||
fade = true;
|
||||
useRadiusMass = true;
|
||||
baseRadius = 0.3;
|
||||
gravModifier = 1.0;
|
||||
terminalVelocity = 20;
|
||||
ignoreWater = false;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Splash effects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GrenadeSplashMist)
|
||||
{
|
||||
dragCoefficient = 1.0;
|
||||
windCoefficient = 2.0;
|
||||
gravityCoefficient = 0.3;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 600;
|
||||
lifetimeVarianceMS = 100;
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -90.0;
|
||||
spinRandomMax = 500.0;
|
||||
spinSpeed = 1;
|
||||
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.2;
|
||||
sizes[1] = 0.4;
|
||||
sizes[2] = 0.8;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeSplashMistEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 5;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 3.0;
|
||||
velocityVariance = 2.0;
|
||||
ejectionOffset = 0.15;
|
||||
thetaMin = 85;
|
||||
thetaMax = 85;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvance = false;
|
||||
lifetimeMS = 250;
|
||||
particles = "GrenadeSplashMist";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeSplashParticle)
|
||||
{
|
||||
dragCoefficient = 1;
|
||||
windCoefficient = 0.9;
|
||||
gravityCoefficient = 0.3;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = -1.4;
|
||||
lifetimeMS = 600;
|
||||
lifetimeVarianceMS = 200;
|
||||
textureName = "data/FPSGameplay/art/particles/droplet";
|
||||
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.25;
|
||||
sizes[2] = 0.25;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeSplashEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 4;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 7.3;
|
||||
velocityVariance = 2.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 30;
|
||||
thetaMax = 80;
|
||||
phiReferenceVel = 00;
|
||||
phiVariance = 360;
|
||||
overrideAdvance = false;
|
||||
orientParticles = true;
|
||||
orientOnVelocity = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "GrenadeSplashParticle";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeSplashRingParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/wake";
|
||||
dragCoefficient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 200;
|
||||
windCoefficient = 0.0;
|
||||
useInvAlpha = 1;
|
||||
spinRandomMin = 30.0;
|
||||
spinRandomMax = 30.0;
|
||||
spinSpeed = 1;
|
||||
|
||||
animateTexture = true;
|
||||
framesPerSec = 1;
|
||||
animTexTiling = "2 1";
|
||||
animTexFrames = "0 1";
|
||||
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
sizes[0] = 2.0;
|
||||
sizes[1] = 4.0;
|
||||
sizes[2] = 8.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeSplashRingEmitter)
|
||||
{
|
||||
lifetimeMS = "100";
|
||||
ejectionPeriodMS = 200;
|
||||
periodVarianceMS = 10;
|
||||
ejectionVelocity = 0;
|
||||
velocityVariance = 0;
|
||||
ejectionOffset = 0;
|
||||
thetaMin = 89;
|
||||
thetaMax = 90;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 1;
|
||||
alignParticles = 1;
|
||||
alignDirection = "0 0 1";
|
||||
particles = "GrenadeSplashRingParticle";
|
||||
};
|
||||
|
||||
datablock SplashData(GrenadeSplash)
|
||||
{
|
||||
// SplashData doesn't have a render function in the source,
|
||||
// so everything but the emitter array is useless here.
|
||||
emitter[0] = GrenadeSplashEmitter;
|
||||
emitter[1] = GrenadeSplashMistEmitter;
|
||||
emitter[2] = GrenadeSplashRingEmitter;
|
||||
|
||||
//numSegments = 15;
|
||||
//ejectionFreq = 15;
|
||||
//ejectionAngle = 40;
|
||||
//ringLifetime = 0.5;
|
||||
//lifetimeMS = 300;
|
||||
//velocity = 4.0;
|
||||
//startRadius = 0.0;
|
||||
//acceleration = -3.0;
|
||||
//texWrap = 5.0;
|
||||
//texture = "data/FPSGameplay/art/images/particles//splash";
|
||||
|
||||
//colors[0] = "0.7 0.8 1.0 0.0";
|
||||
//colors[1] = "0.7 0.8 1.0 0.3";
|
||||
//colors[2] = "0.7 0.8 1.0 0.7";
|
||||
//colors[3] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
//times[0] = 0.0;
|
||||
//times[1] = 0.4;
|
||||
//times[2] = 0.8;
|
||||
//times[3] = 1.0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Explosion Particle effects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GrenadeExpFire)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
dragCoeffiecient = 0;
|
||||
windCoeffiecient = 0.5;
|
||||
gravityCoefficient = -1;
|
||||
inheritedVelFactor = 0;
|
||||
constantAcceleration = 0;
|
||||
lifetimeMS = 1200;//3000;
|
||||
lifetimeVarianceMS = 100;//200;
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = 0;
|
||||
spinRandomMax = 1;
|
||||
spinSpeed = 1;
|
||||
colors[0] = "0.886275 0.854902 0.733333 0.795276";
|
||||
colors[1] = "0.356863 0.34902 0.321569 0.266";
|
||||
colors[2] = "0.0235294 0.0235294 0.0235294 0.207";
|
||||
sizes[0] = 1;//2;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 7;//0.5;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
animTexName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
times[3] = "1";
|
||||
dragCoefficient = "1.99902";
|
||||
sizes[3] = "10";
|
||||
colors[3] = "0 0 0 0";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeExpFireEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 5;//0;
|
||||
ejectionVelocity = 1;//1.0;
|
||||
velocityVariance = 0;//0.5;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 45;
|
||||
lifetimeMS = 250;
|
||||
particles = "GrenadeExpFire";
|
||||
blendStyle = "ADDITIVE";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeExpDust)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke.png";
|
||||
dragCoefficient = 0.498534;
|
||||
gravityCoefficient = 0;
|
||||
inheritedVelFactor = 1;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 2000;
|
||||
lifetimeVarianceMS = 250;
|
||||
useInvAlpha = 0;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -90.0;
|
||||
spinRandomMax = 90.0;
|
||||
colors[0] = "0.992126 0.992126 0.992126 0.96063";
|
||||
colors[1] = "0.11811 0.11811 0.11811 0.929134";
|
||||
colors[2] = "0.00392157 0.00392157 0.00392157 0.362205";
|
||||
sizes[0] = 1.59922;
|
||||
sizes[1] = 4.99603;
|
||||
sizes[2] = 9.99817;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.494118;
|
||||
times[2] = 1.0;
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke.png";
|
||||
colors[3] = "0.996078 0.996078 0.996078 0";
|
||||
sizes[3] = "15";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeExpDustEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 5;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 8;
|
||||
velocityVariance = 0.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 85;
|
||||
thetaMax = 85;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = 0;
|
||||
lifetimeMS = 2000;
|
||||
particles = "GrenadeExpDust";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeExpSpark)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/Sparkparticle";
|
||||
dragCoefficient = 1;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 250;
|
||||
colors[0] = "0.6 0.4 0.3 1";
|
||||
colors[1] = "0.6 0.4 0.3 1";
|
||||
colors[2] = "1.0 0.4 0.3 0";
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.75;
|
||||
sizes[2] = 1;
|
||||
times[0] = 0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeExpSparkEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 2;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 20;
|
||||
velocityVariance = 10;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 120;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
orientParticles = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "GrenadeExpSpark";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeExpSparks)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/droplet";
|
||||
dragCoefficient = 1;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 350;
|
||||
|
||||
colors[0] = "0.6 0.4 0.3 1.0";
|
||||
colors[1] = "0.6 0.4 0.3 0.6";
|
||||
colors[2] = "1.0 0.4 0.3 0.0";
|
||||
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.5;
|
||||
sizes[2] = 0.75;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeExpSparksEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 2;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 12;
|
||||
velocityVariance = 6.75;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 60;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
orientParticles = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "GrenadeExpSparks";
|
||||
};
|
||||
|
||||
datablock ParticleData(GrenadeExpSmoke)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
dragCoeffiecient = 0;
|
||||
gravityCoefficient = -0.40293;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 299;
|
||||
useInvAlpha = true;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -80.0;
|
||||
spinRandomMax = 0;
|
||||
colors[0] = "0.8 0.8 0.8 0.4";
|
||||
colors[1] = "0.5 0.5 0.5 0.5";
|
||||
colors[2] = "0.75 0.75 0.75 0";
|
||||
sizes[0] = 4.49857;
|
||||
sizes[1] = 7.49863;
|
||||
sizes[2] = 11.2495;
|
||||
times[0] = 0;
|
||||
times[1] = 0.498039;
|
||||
times[2] = 1;
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeExpSmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 15;
|
||||
periodVarianceMS = 5;
|
||||
ejectionVelocity = 2.4;
|
||||
velocityVariance = 1.2;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
ejectionOffset = 1;
|
||||
particles = "GrenadeExpSmoke";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Dry/Air Explosion Objects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ExplosionData(GrenadeExplosion)
|
||||
{
|
||||
soundProfile = GrenadeExplosionSound;
|
||||
lifeTimeMS = 400; // Quick flash, short burn, and moderate dispersal
|
||||
|
||||
// Volume particles
|
||||
particleEmitter = GrenadeExpFireEmitter;
|
||||
particleDensity = 75;
|
||||
particleRadius = 2.25;
|
||||
|
||||
// Point emission
|
||||
emitter[0] = GrenadeExpDustEmitter;
|
||||
emitter[1] = GrenadeExpSparksEmitter;
|
||||
emitter[2] = GrenadeExpSmokeEmitter;
|
||||
|
||||
// Camera Shaking
|
||||
shakeCamera = true;
|
||||
camShakeFreq = "10.0 11.0 9.0";
|
||||
camShakeAmp = "15.0 15.0 15.0";
|
||||
camShakeDuration = 1.5;
|
||||
camShakeRadius = 20;
|
||||
|
||||
// Exploding debris
|
||||
debris = GrenadeDebris;
|
||||
debrisThetaMin = 10;
|
||||
debrisThetaMax = 60;
|
||||
debrisNum = 4;
|
||||
debrisNumVariance = 2;
|
||||
debrisVelocity = 25;
|
||||
debrisVelocityVariance = 5;
|
||||
|
||||
lightStartRadius = 4.0;
|
||||
lightEndRadius = 0.0;
|
||||
lightStartColor = "1.0 1.0 1.0";
|
||||
lightEndColor = "1.0 1.0 1.0";
|
||||
lightStartBrightness = 4.0;
|
||||
lightEndBrightness = 0.0;
|
||||
lightNormalOffset = 2.0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Water Explosion
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GLWaterExpDust)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/steam";
|
||||
dragCoefficient = 1.0;
|
||||
gravityCoefficient = -0.01;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 250;
|
||||
useInvAlpha = false;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -90.0;
|
||||
spinRandomMax = 500.0;
|
||||
colors[0] = "0.6 0.6 1.0 0.5";
|
||||
colors[1] = "0.6 0.6 1.0 0.3";
|
||||
|
||||
sizes[0] = 0.25;
|
||||
sizes[1] = 1.5;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.0;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GLWaterExpDustEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 1;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 10;
|
||||
velocityVariance = 0.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 85;
|
||||
thetaMax = 85;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
lifetimeMS = 75;
|
||||
particles = "GLWaterExpDust";
|
||||
};
|
||||
|
||||
datablock ParticleData(GLWaterExpSparks)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/spark_wet";
|
||||
dragCoefficient = 1;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 250;
|
||||
|
||||
colors[0] = "0.6 0.6 1.0 1.0";
|
||||
colors[1] = "0.6 0.6 1.0 1.0";
|
||||
colors[2] = "0.6 0.6 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.5;
|
||||
sizes[2] = 0.75;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GLWaterExpSparkEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 2;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 12;
|
||||
velocityVariance = 6.75;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 60;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
orientParticles = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "GLWaterExpSparks";
|
||||
};
|
||||
|
||||
datablock ParticleData(GLWaterExpSmoke)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
dragCoeffiecient = 0.4;
|
||||
gravityCoefficient = -0.25;
|
||||
inheritedVelFactor = 0.025;
|
||||
constantAcceleration = -1.1;
|
||||
lifetimeMS = 1250;
|
||||
lifetimeVarianceMS = 0;
|
||||
useInvAlpha = false;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -200.0;
|
||||
spinRandomMax = 200.0;
|
||||
|
||||
colors[0] = "0.1 0.1 1.0 1.0";
|
||||
colors[1] = "0.4 0.4 1.0 1.0";
|
||||
colors[2] = "0.4 0.4 1.0 0.0";
|
||||
|
||||
sizes[0] = 2.0;
|
||||
sizes[1] = 6.0;
|
||||
sizes[2] = 2.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GLWaterExpSmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 15;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 6.25;
|
||||
velocityVariance = 0.25;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 90.0;
|
||||
lifetimeMS = 250;
|
||||
particles = "GLWaterExpSmoke";
|
||||
};
|
||||
|
||||
datablock ParticleData(GLWaterExpBubbles)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/millsplash01";
|
||||
dragCoefficient = 0.0;
|
||||
gravityCoefficient = -0.05;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1500;
|
||||
lifetimeVarianceMS = 250;
|
||||
useInvAlpha = false;
|
||||
|
||||
spinRandomMin = -100.0;
|
||||
spinRandomMax = 100.0;
|
||||
spinSpeed = 1;
|
||||
|
||||
colors[0] = "0.7 0.8 1.0 0.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.4";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.2;
|
||||
sizes[1] = 0.4;
|
||||
sizes[2] = 0.8;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GLWaterExpBubbleEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 5;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 1.0;
|
||||
ejectionOffset = 3.0;
|
||||
velocityVariance = 0.5;
|
||||
thetaMin = 0;
|
||||
thetaMax = 80;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
particles = "GLWaterExpBubbles";
|
||||
};
|
||||
|
||||
datablock ExplosionData(GrenadeLauncherWaterExplosion)
|
||||
{
|
||||
//soundProfile = GLWaterExplosionSound;
|
||||
|
||||
emitter[0] = GLWaterExpDustEmitter;
|
||||
emitter[1] = GLWaterExpSparkEmitter;
|
||||
emitter[2] = GLWaterExpSmokeEmitter;
|
||||
emitter[3] = GLWaterExpBubbleEmitter;
|
||||
|
||||
shakeCamera = true;
|
||||
camShakeFreq = "10.0 11.0 9.0";
|
||||
camShakeAmp = "20.0 20.0 20.0";
|
||||
camShakeDuration = 1.5;
|
||||
camShakeRadius = 20.0;
|
||||
|
||||
lightStartRadius = 20.0;
|
||||
lightEndRadius = 0.0;
|
||||
lightStartColor = "0.9 0.9 0.8";
|
||||
lightEndColor = "0.6 0.6 1.0";
|
||||
lightStartBrightness = 2.0;
|
||||
lightEndBrightness = 0.0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Dry/Air Explosion Objects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ExplosionData(GrenadeSubExplosion)
|
||||
{
|
||||
offset = 0.25;
|
||||
emitter[0] = GrenadeExpSparkEmitter;
|
||||
|
||||
lightStartRadius = 4.0;
|
||||
lightEndRadius = 0.0;
|
||||
lightStartColor = "0.9 0.7 0.7";
|
||||
lightEndColor = "0.9 0.7 0.7";
|
||||
lightStartBrightness = 2.0;
|
||||
lightEndBrightness = 0.0;
|
||||
};
|
||||
|
||||
datablock ExplosionData(GrenadeLauncherExplosion)
|
||||
{
|
||||
soundProfile = GrenadeLauncherExplosionSound;
|
||||
lifeTimeMS = 400; // Quick flash, short burn, and moderate dispersal
|
||||
|
||||
// Volume particles
|
||||
particleEmitter = GrenadeExpFireEmitter;
|
||||
particleDensity = 75;
|
||||
particleRadius = 2.25;
|
||||
|
||||
// Point emission
|
||||
emitter[0] = GrenadeExpDustEmitter;
|
||||
emitter[1] = GrenadeExpSparksEmitter;
|
||||
emitter[2] = GrenadeExpSmokeEmitter;
|
||||
|
||||
// Sub explosion objects
|
||||
subExplosion[0] = GrenadeSubExplosion;
|
||||
|
||||
// Camera Shaking
|
||||
shakeCamera = true;
|
||||
camShakeFreq = "10.0 11.0 9.0";
|
||||
camShakeAmp = "15.0 15.0 15.0";
|
||||
camShakeDuration = 1.5;
|
||||
camShakeRadius = 20;
|
||||
|
||||
// Exploding debris
|
||||
debris = GrenadeDebris;
|
||||
debrisThetaMin = 10;
|
||||
debrisThetaMax = 60;
|
||||
debrisNum = 4;
|
||||
debrisNumVariance = 2;
|
||||
debrisVelocity = 25;
|
||||
debrisVelocityVariance = 5;
|
||||
|
||||
lightStartRadius = 4.0;
|
||||
lightEndRadius = 0.0;
|
||||
lightStartColor = "1.0 1.0 1.0";
|
||||
lightEndColor = "1.0 1.0 1.0";
|
||||
lightStartBrightness = 4.0;
|
||||
lightEndBrightness = 0.0;
|
||||
lightNormalOffset = 2.0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Underwater Grenade projectile trail
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GrenadeTrailWaterParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/bubble";
|
||||
dragCoefficient = 0.0;
|
||||
gravityCoefficient = 0.1;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1500;
|
||||
lifetimeVarianceMS = 600;
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -100.0;
|
||||
spinRandomMax = 100.0;
|
||||
spinSpeed = 1;
|
||||
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.4";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
|
||||
sizes[0] = 0.05;
|
||||
sizes[1] = 0.05;
|
||||
sizes[2] = 0.05;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeTrailWaterEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 5;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 1.0;
|
||||
ejectionOffset = 0.1;
|
||||
velocityVariance = 0.5;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 80.0;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
particles = GrenadeTrailWaterParticle;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Normal-fire Projectile Object
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(GrenadeProjSmokeTrail)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.2;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 750;
|
||||
lifetimeVarianceMS = 250;
|
||||
useInvAlpha = true;
|
||||
spinRandomMin = -60;
|
||||
spinRandomMax = 60;
|
||||
spinSpeed = 1;
|
||||
|
||||
colors[0] = "0.9 0.8 0.8 0.6";
|
||||
colors[1] = "0.6 0.6 0.6 0.9";
|
||||
colors[2] = "0.3 0.3 0.3 0";
|
||||
|
||||
sizes[0] = 0.25;
|
||||
sizes[1] = 0.5;
|
||||
sizes[2] = 0.75;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.4;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(GrenadeProjSmokeTrailEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 0.75;
|
||||
velocityVariance = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
phiReferenceVel = 90;
|
||||
phiVariance = 0;
|
||||
particles = "GrenadeProjSmokeTrail";
|
||||
};
|
||||
|
||||
datablock ProjectileData(GrenadeLauncherProjectile)
|
||||
{
|
||||
projectileShapeName = "data/FPSGameplay/art/shapes/weapons/shared/rocket.dts";
|
||||
directDamage = 30;
|
||||
radiusDamage = 30;
|
||||
damageRadius = 5;
|
||||
areaImpulse = 2000;
|
||||
|
||||
explosion = GrenadeLauncherExplosion;
|
||||
waterExplosion = GrenadeLauncherWaterExplosion;
|
||||
|
||||
decal = ScorchRXDecal;
|
||||
splash = GrenadeSplash;
|
||||
|
||||
particleEmitter = GrenadeProjSmokeTrailEmitter;
|
||||
particleWaterEmitter = GrenadeTrailWaterEmitter;
|
||||
|
||||
muzzleVelocity = 30;
|
||||
velInheritFactor = 0.3;
|
||||
|
||||
armingDelay = 2000;
|
||||
lifetime = 10000;
|
||||
fadeDelay = 4500;
|
||||
|
||||
bounceElasticity = 0.4;
|
||||
bounceFriction = 0.3;
|
||||
isBallistic = true;
|
||||
gravityMod = 0.9;
|
||||
|
||||
lightDesc = GrenadeLauncherLightDesc;
|
||||
|
||||
damageType = "GrenadeDamage";
|
||||
};
|
||||
|
|
@ -0,0 +1,504 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// Placeholder explosion with required sounds, debris, and particle datablocks.
|
||||
// These datablocks existed in now removed scripts, but were used within some
|
||||
// that remain: see cheetahCar.cs
|
||||
//
|
||||
// These should be made more generic or new fx created for the cheetah turret's
|
||||
// projectile explosion effects.
|
||||
//
|
||||
// I've removed all effects that are not required for the current weapons. On
|
||||
// reflection I really went overboard when originally designing these effects!
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Sound
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock SFXProfile(RocketLauncherExplosionSound)
|
||||
{
|
||||
filename = "data/FPSGameplay/sound/weapons/Crossbow_explosion";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Debris
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(RocketDebrisTrailParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/impact";
|
||||
dragCoeffiecient = 0;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1200;//1000;
|
||||
lifetimeVarianceMS = 299;//500;
|
||||
useInvAlpha = true;//false;
|
||||
spinSpeed = 1;
|
||||
spinRandomMin = -300.0;
|
||||
spinRandomMax = 0;
|
||||
colors[0] = "1 0.897638 0.795276 0.4";
|
||||
colors[1] = "0.795276 0.795276 0.795276 0.6";
|
||||
colors[2] = "0 0 0 0";
|
||||
sizes[0] = 0.5;//1.0;
|
||||
sizes[1] = 2;
|
||||
sizes[2] = 1;//1.0;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.498039;
|
||||
times[2] = 1.0;
|
||||
animTexName = "data/FPSGameplay/art/particles/impact";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketDebrisTrailEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 6;//8;
|
||||
periodVarianceMS = 2;//4;
|
||||
ejectionVelocity = 1.0;
|
||||
velocityVariance = 0.5;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
ejectionoffset = 0.0;//0.3;
|
||||
particles = "RocketDebrisTrailParticle";
|
||||
};
|
||||
|
||||
datablock DebrisData(RocketDebris)
|
||||
{
|
||||
shapeFile = "data/FPSGameplay/art/shapes/weapons/shared/rocket.dts";
|
||||
emitters[0] = RocketDebrisTrailEmitter;
|
||||
elasticity = 0.5;
|
||||
friction = 0.5;
|
||||
numBounces = 1;//2;
|
||||
bounceVariance = 1;
|
||||
explodeOnMaxBounce = true;
|
||||
staticOnMaxBounce = false;
|
||||
snapOnMaxBounce = false;
|
||||
minSpinSpeed = 400;
|
||||
maxSpinSpeed = 800;
|
||||
render2D = false;
|
||||
lifetime = 0.25;//0.5;//1;//2;
|
||||
lifetimeVariance = 0.0;//0.25;//0.5;
|
||||
velocity = 35;//30;//15;
|
||||
velocityVariance = 10;//5;
|
||||
fade = true;
|
||||
useRadiusMass = true;
|
||||
baseRadius = 0.3;
|
||||
gravModifier = 1.0;
|
||||
terminalVelocity = 45;
|
||||
ignoreWater = false;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Splash effects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(RocketSplashMist)
|
||||
{
|
||||
dragCoefficient = 1.0;
|
||||
windCoefficient = 2.0;
|
||||
gravityCoefficient = 0.3;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 600;
|
||||
lifetimeVarianceMS = 100;
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -90.0;
|
||||
spinRandomMax = 500.0;
|
||||
spinSpeed = 1;
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
sizes[0] = 0.2;//0.5;
|
||||
sizes[1] = 0.4;//0.5;
|
||||
sizes[2] = 0.8;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketSplashMistEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 5;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 3.0;
|
||||
velocityVariance = 2.0;
|
||||
ejectionOffset = 0.15;
|
||||
thetaMin = 85;
|
||||
thetaMax = 85;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvance = false;
|
||||
lifetimeMS = 250;
|
||||
particles = "RocketSplashMist";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketSplashParticle)
|
||||
{
|
||||
dragCoefficient = 1;
|
||||
windCoefficient = 0.9;
|
||||
gravityCoefficient = 0.3;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = -1.4;
|
||||
lifetimeMS = 600;
|
||||
lifetimeVarianceMS = 200;
|
||||
textureName = "data/FPSGameplay/art/particles/droplet";
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.25;
|
||||
sizes[2] = 0.25;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketSplashEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 4;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 7.3;
|
||||
velocityVariance = 2.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 30;
|
||||
thetaMax = 80;
|
||||
phiReferenceVel = 00;
|
||||
phiVariance = 360;
|
||||
overrideAdvance = false;
|
||||
orientParticles = true;
|
||||
orientOnVelocity = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "RocketSplashParticle";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketSplashRingParticle)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/wake";
|
||||
dragCoefficient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 200;
|
||||
windCoefficient = 0.0;
|
||||
useInvAlpha = 1;
|
||||
spinRandomMin = 30.0;
|
||||
spinRandomMax = 30.0;
|
||||
spinSpeed = 1;
|
||||
animateTexture = true;
|
||||
framesPerSec = 1;
|
||||
animTexTiling = "2 1";
|
||||
animTexFrames = "0 1";
|
||||
colors[0] = "0.7 0.8 1.0 1.0";
|
||||
colors[1] = "0.7 0.8 1.0 0.5";
|
||||
colors[2] = "0.7 0.8 1.0 0.0";
|
||||
sizes[0] = 2.0;
|
||||
sizes[1] = 4.0;
|
||||
sizes[2] = 8.0;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketSplashRingEmitter)
|
||||
{
|
||||
lifetimeMS = "100";
|
||||
ejectionPeriodMS = 200;
|
||||
periodVarianceMS = 10;
|
||||
ejectionVelocity = 0;
|
||||
velocityVariance = 0;
|
||||
ejectionOffset = 0;
|
||||
thetaMin = 89;
|
||||
thetaMax = 90;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 1;
|
||||
alignParticles = 1;
|
||||
alignDirection = "0 0 1";
|
||||
particles = "RocketSplashRingParticle";
|
||||
};
|
||||
|
||||
datablock SplashData(RocketSplash)
|
||||
{
|
||||
// numSegments = 15;
|
||||
// ejectionFreq = 15;
|
||||
// ejectionAngle = 40;
|
||||
// ringLifetime = 0.5;
|
||||
// lifetimeMS = 300;
|
||||
// velocity = 4.0;
|
||||
// startRadius = 0.0;
|
||||
// acceleration = -3.0;
|
||||
// texWrap = 5.0;
|
||||
// texture = "data/FPSGameplay/art/images/particles/splash";
|
||||
|
||||
emitter[0] = RocketSplashEmitter;
|
||||
emitter[1] = RocketSplashMistEmitter;
|
||||
emitter[2] = RocketSplashRingEmitter;
|
||||
|
||||
// colors[0] = "0.7 0.8 1.0 0.0";
|
||||
// colors[1] = "0.7 0.8 1.0 0.3";
|
||||
// colors[2] = "0.7 0.8 1.0 0.7";
|
||||
// colors[3] = "0.7 0.8 1.0 0.0";
|
||||
//
|
||||
// times[0] = 0.0;
|
||||
// times[1] = 0.4;
|
||||
// times[2] = 0.8;
|
||||
// times[3] = 1.0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Explosion Particle effects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(RocketExpFire)
|
||||
{
|
||||
gravityCoefficient = "-0.50061";
|
||||
lifetimeMS = "400";
|
||||
lifetimeVarianceMS = "299";
|
||||
spinSpeed = "1";
|
||||
spinRandomMin = "-200";
|
||||
spinRandomMax = "0";
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke";
|
||||
colors[0] = "1 0.897638 0.795276 1";
|
||||
colors[1] = "0.795276 0.393701 0 0.6";
|
||||
colors[2] = "0 0 0 0";
|
||||
sizes[0] = "1.99902";
|
||||
sizes[1] = "7.99915";
|
||||
sizes[2] = "3.99805";
|
||||
times[1] = "0.392157";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpFireEmitter)
|
||||
{
|
||||
ejectionPeriodMS = "10";
|
||||
periodVarianceMS = "5";
|
||||
ejectionVelocity = "3";
|
||||
velocityVariance = "2";
|
||||
particles = "RocketExpFire";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketExpFireball)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
lifetimeMS = "300";
|
||||
lifetimeVarianceMS = "299";
|
||||
spinSpeed = "1";
|
||||
spinRandomMin = "-400";
|
||||
spinRandomMax = "0";
|
||||
animTexName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
colors[0] = "1 0.897638 0.795276 0.2";
|
||||
colors[1] = "1 0.496063 0 0.6";
|
||||
colors[2] = "0.0944882 0.0944882 0.0944882 0";
|
||||
sizes[0] = "0.997986";
|
||||
sizes[1] = "1.99902";
|
||||
sizes[2] = "2.99701";
|
||||
times[1] = "0.498039";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
gravityCoefficient = "-1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpFireballEmitter)
|
||||
{
|
||||
particles = "RocketExpFireball";
|
||||
blendStyle = "ADDITIVE";
|
||||
ejectionPeriodMS = "10";
|
||||
periodVarianceMS = "5";
|
||||
ejectionVelocity = "4";
|
||||
velocityVariance = "2";
|
||||
ejectionOffset = "2";
|
||||
thetaMax = "120";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketExpSmoke)
|
||||
{
|
||||
lifetimeMS = 1200;//"1250";
|
||||
lifetimeVarianceMS = 299;//200;//"250";
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke";
|
||||
useInvAlpha = "1";
|
||||
gravityCoefficient = "-0.100122";
|
||||
spinSpeed = "1";
|
||||
spinRandomMin = "-100";
|
||||
spinRandomMax = "0";
|
||||
colors[0] = "0.897638 0.795276 0.692913 0.4";//"0.192157 0.192157 0.192157 0.0944882";
|
||||
colors[1] = "0.897638 0.897638 0.897638 0.8";//"0.454902 0.454902 0.454902 0.897638";
|
||||
colors[2] = "0.4 0.4 0.4 0";//"1 1 1 0";
|
||||
sizes[0] = "1.99597";
|
||||
sizes[1] = "3.99805";
|
||||
sizes[2] = "7.99915";
|
||||
times[1] = "0.494118";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpSmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = "15";
|
||||
periodVarianceMS = "5";
|
||||
//ejectionOffset = "1";
|
||||
thetaMax = "180";
|
||||
particles = "RocketExpSmoke";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketExpSparks)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/droplet.png";
|
||||
lifetimeMS = "100";
|
||||
lifetimeVarianceMS = "50";
|
||||
animTexName = "data/FPSGameplay/art/particles/droplet.png";
|
||||
inheritedVelFactor = "0.391389";
|
||||
sizes[0] = "1.99902";
|
||||
sizes[1] = "2.49954";
|
||||
sizes[2] = "0.997986";
|
||||
colors[0] = "1.0 0.9 0.8 0.2";
|
||||
colors[1] = "1.0 0.9 0.8 0.8";
|
||||
colors[2] = "0.8 0.4 0.0 0.0";
|
||||
times[0] = "0";
|
||||
times[1] = "0.34902";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpSparksEmitter)
|
||||
{
|
||||
particles = "RocketExpSparks";
|
||||
blendStyle = "NORMAL";
|
||||
ejectionPeriodMS = "10";
|
||||
periodVarianceMS = "5";
|
||||
ejectionVelocity = "60";
|
||||
velocityVariance = "10";
|
||||
thetaMax = "120";
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = "360";
|
||||
ejectionOffset = "0";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = true;
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketExpSubFireParticles)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
gravityCoefficient = "-0.202686";
|
||||
lifetimeMS = "400";
|
||||
lifetimeVarianceMS = "299";
|
||||
spinSpeed = "1";
|
||||
spinRandomMin = "-200";
|
||||
spinRandomMax = "0";
|
||||
animTexName = "data/FPSGameplay/art/particles/fireball.png";
|
||||
colors[0] = "1 0.897638 0.795276 0.2";
|
||||
colors[1] = "1 0.496063 0 1";
|
||||
colors[2] = "0.0944882 0.0944882 0.0944882 0";
|
||||
sizes[0] = "0.997986";
|
||||
sizes[1] = "1.99902";
|
||||
sizes[2] = "2.99701";
|
||||
times[1] = "0.498039";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpSubFireEmitter)
|
||||
{
|
||||
particles = "RocketExpSubFireParticles";
|
||||
blendStyle = "ADDITIVE";
|
||||
ejectionPeriodMS = "10";
|
||||
periodVarianceMS = "5";
|
||||
ejectionVelocity = "4";
|
||||
velocityVariance = "2";
|
||||
thetaMax = "120";
|
||||
};
|
||||
|
||||
datablock ParticleData(RocketExpSubSmoke)
|
||||
{
|
||||
textureName = "data/FPSGameplay/art/particles/smoke";
|
||||
gravityCoefficient = "-0.40293";
|
||||
lifetimeMS = "800";
|
||||
lifetimeVarianceMS = "299";
|
||||
spinSpeed = "1";
|
||||
spinRandomMin = "-200";
|
||||
spinRandomMax = "0";
|
||||
animTexName = "data/FPSGameplay/art/particles/smoke";
|
||||
colors[0] = "0.4 0.35 0.3 0.393701";
|
||||
colors[1] = "0.45 0.45 0.45 0.795276";
|
||||
colors[2] = "0.4 0.4 0.4 0";
|
||||
sizes[0] = "1.99902";
|
||||
sizes[1] = "3.99805";
|
||||
sizes[2] = "7.99915";
|
||||
times[1] = "0.4";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RocketExpSubSmokeEmitter)
|
||||
{
|
||||
particles = "RocketExpSubSmoke";
|
||||
ejectionPeriodMS = "30";
|
||||
periodVarianceMS = "10";
|
||||
ejectionVelocity = "2";
|
||||
velocityVariance = "1";
|
||||
ejectionOffset = 1;//"2";
|
||||
blendStyle = "NORMAL";
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Dry/Air Explosion Objects
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
datablock ExplosionData(RocketSubExplosion)
|
||||
{
|
||||
lifeTimeMS = 100;
|
||||
offset = 0.4;
|
||||
emitter[0] = RocketExpSubFireEmitter;
|
||||
emitter[1] = RocketExpSubSmokeEmitter;
|
||||
};
|
||||
|
||||
|
||||
datablock ExplosionData(RocketLauncherExplosion)
|
||||
{
|
||||
soundProfile = RocketLauncherExplosionSound;
|
||||
lifeTimeMS = 200; // I want a quick bang and dissipation, not a slow burn-out
|
||||
|
||||
// Volume particles
|
||||
particleEmitter = RocketExpSmokeEmitter;
|
||||
particleDensity = 10;//20;
|
||||
particleRadius = 1;//2;
|
||||
|
||||
// Point emission
|
||||
emitter[0] = RocketExpFireEmitter;
|
||||
emitter[1] = RocketExpSparksEmitter;
|
||||
emitter[2] = RocketExpSparksEmitter;
|
||||
emitter[3] = RocketExpFireballEmitter;
|
||||
|
||||
// Sub explosion objects
|
||||
subExplosion[0] = RocketSubExplosion;
|
||||
|
||||
// Camera Shaking
|
||||
shakeCamera = true;
|
||||
camShakeFreq = "10.0 11.0 9.0";
|
||||
camShakeAmp = "15.0 15.0 15.0";
|
||||
camShakeDuration = 1.5;
|
||||
camShakeRadius = 20;
|
||||
|
||||
// Exploding debris
|
||||
debris = RocketDebris;
|
||||
debrisThetaMin = 0;//10;
|
||||
debrisThetaMax = 90;//80;
|
||||
debrisNum = 5;
|
||||
debrisNumVariance = 2;
|
||||
debrisVelocity = 1;//2;
|
||||
debrisVelocityVariance = 0.2;//0.5;
|
||||
|
||||
lightStartRadius = 6.0;
|
||||
lightEndRadius = 0.0;
|
||||
lightStartColor = "1.0 0.7 0.2";
|
||||
lightEndColor = "0.9 0.7 0.0";
|
||||
lightStartBrightness = 2.5;
|
||||
lightEndBrightness = 0.0;
|
||||
lightNormalOffset = 3.0;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue