home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------
- -- Set up the explosion profiles --
- ---------------------------------------
- --
- -- exp_DefineProfile(type, effectName, speed);
- -- type: 0 = small, 1 = medium, 2 = large : these correspond to the smartprop callback explosion_small etc...
- -- type: 3 to 12 correspond to the smartprop callback explosion_1 to explosion_10
- --
- -- after defining the explosion characteristics, then define the amount of force and damage it does
- -- for each of the four zones (index 0 to 3) using the function:
- -- exp_DefineProfileDamage(type, zone, radius, force, damage);
- -- note: the radius for zone 3 is irrelevant, since it's assumed to be anything outside of zone2
- --
- -- you can call exp_Trigger(type, position); from the Lua console to test...
- --
-
- -- small explosion (no damage just force)
- -- Only 2 radii of influence
- exp_DefineProfile(0, "", "", 20.0);
- exp_DefineProfileDamage(0, 0, 6.0, 1.0, 0.0);
- exp_DefineProfileDamage(0, 1, 12.0, 0.0, 0.0);
- exp_DefineProfileDamage(0, 2, 24.0, 0.0, 0.0);
- exp_DefineProfileDamage(0, 3, 30.0, 0.0, 0.0);
- --exp_DefineProfile(0, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 20.0);
- --exp_DefineProfileDamage(0, 0, 6.0, 1.0, 0.0);
- --exp_DefineProfileDamage(0, 1, 12.0, 0.7, 0.0);
- --exp_DefineProfileDamage(0, 2, 24.0, 0.0, 0.0);
- --exp_DefineProfileDamage(0, 3, 30.0, 0.0, 0.0);
-
- -- medium explosion (close: no damage just force): rockets
- exp_DefineProfile(1, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 25.0);
- exp_DefineProfileDamage(1, 0, 2, 100.0, 50.0);
- exp_DefineProfileDamage(1, 1, 4.0, 50.0, 20.0);
- exp_DefineProfileDamage(1, 2, 8.0, 12.0, 0.0);
- exp_DefineProfileDamage(1, 3, 37.5, 0.0, 0.0);
-
- -- large explosion (no damage just force)
- exp_DefineProfile(2, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 30.0);
- exp_DefineProfileDamage(2, 0, 3, 100.0, 75.0);
- exp_DefineProfileDamage(2, 1, 7.0, 50.0, 40.0);
- exp_DefineProfileDamage(2, 2, 24.0, 10.0, 0.0);
- exp_DefineProfileDamage(2, 3, 45.0, 0.0, 0.0);
-
- -- Explosion 3 (Force, Damage, and Knockdown): explosive barrels
- exp_DefineProfile(3, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 20.0);
- exp_DefineProfileDamage(3, 0, 2.5, 100.0, 50.0);
- exp_DefineProfileDamage(3, 1, 4.0, 50.0, 25.0);
- exp_DefineProfileDamage(3, 2, 8.0, 12.0, 0.0);
- exp_DefineProfileDamage(3, 3, 30.0, 0.0, 0.0);
-
- -- Explosion 4 (Force and Damage)
- exp_DefineProfile(4, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 20.0);
- exp_DefineProfileDamage(4, 0, 6.0, 50.0, 40.0);
- exp_DefineProfileDamage(4, 1, 12.0, 30.0, 20.0);
- exp_DefineProfileDamage(4, 2, 24.0, 10.0, 6.0);
- exp_DefineProfileDamage(4, 3, 30.0, 0.0, 0.0);
-
- -- THIS EXPLOSION DEFINITION HAS A TYPO - IT'S REDEFINING EXPLOSION 4
- -- Currently this is used by C4_ledgedata.p3d, which therefore has no force, damage,
- -- and will be deleted the second frame which may affect the visuals...
- -- Explosion 5 (Force and Damage)
- exp_DefineProfile(5, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 20.0);
- exp_DefineProfileDamage(4, 0, 6.0, 50.0, 40.0);
- exp_DefineProfileDamage(4, 1, 12.0, 30.0, 20.0);
- exp_DefineProfileDamage(4, 2, 24.0, 10.0, 6.0);
- exp_DefineProfileDamage(4, 3, 40.0, 0.0, 0.0);
-
- -- FLUX Grenade explosion profile (EXPLOSION_4 in the smart prop)
- exp_DefineProfile(6, "missile_hit_local_missile_hit_expl_loc", "grenade_hit_world_grenade_hit_expl_world", 25.0);
- exp_DefineProfileDamage(6, 0, 2, 100.0, 50.0);
- exp_DefineProfileDamage(6, 1, 4.0, 60.0, 25.0);
- exp_DefineProfileDamage(6, 2, 8.0, 0.0, 10.0);
- exp_DefineProfileDamage(6, 3, 37.5, 0.0, 0.0);
-
- -- Explosion_7 (Force and Damage) -- for train -- created by Derek
- exp_DefineProfile(9, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 25.0);
- exp_DefineProfileDamage(9, 0, 2, 100.0, 0.0);
- exp_DefineProfileDamage(9, 1, 4.0, 50.0, 0.0);
- exp_DefineProfileDamage(9, 2, 8.0, 12.0, 0.0);
- exp_DefineProfileDamage(9, 3, 37.5, 0.0, 0.0);
-
- -- Explosion_8 new explosion profile for missile soldiers
- -- Tuning this with Tim - DO NOT ALTER
- exp_DefineProfile(10, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 25.0);
- exp_DefineProfileDamage(10, 0, 2, 100.0, 75.0);
- exp_DefineProfileDamage(10, 1, 4.0, 50.0, 20.0);
- exp_DefineProfileDamage(10, 2, 8.0, 12.0, 0.0);
- exp_DefineProfileDamage(10, 3, 37.5, 0.0, 0.0);
-
- -- Explosion_9 new explosion profile for gamma elite missiles
- -- Tuning this with Tim - DO NOT ALTER
- exp_DefineProfile(11, "missile_hit_local_missile_hit_expl_loc", "missile_hit_world_missile_hit_expl_world", 20.0);
- exp_DefineProfileDamage(11, 0, 2, 60.0, 30.0);
- exp_DefineProfileDamage(11, 1, 3.0, 25.0, 10.0);
- exp_DefineProfileDamage(11, 2, 8.0, 0.0, 0.0);
- exp_DefineProfileDamage(11, 3, 37.5, 0.0, 0.0);
-
- -- Explosion 12 (Force and Damage) -- BRIAN S IS USING THIS FOR ICE .. TALK TO HIM BEFORE YOU TWEAK
- exp_DefineProfile(12, "", "", 20.0);
- exp_DefineProfileDamage(12, 0, 2, 60.0, 80.0);
- exp_DefineProfileDamage(12, 1, 4, 40.0, 40.0);
- exp_DefineProfileDamage(12, 2, 5, 0, 0);
- exp_DefineProfileDamage(12, 3, 5.0, 0.0, 0.0);
-
- -- Explosions 3 - 12 (corresponding to Explosion_1 to Explosion_10) are defaulted in code
- -- to the same parameters as Explosions 0 (small explosion)... you can add the tuning calls as you see fit.
-
- -------------------------------------------------------
- -- Set up the character damage reaction profiles --
- -------------------------------------------------------
- -- char_DefineDamageProfile(int size, maxForce, maxVelocity, maxHitReactionTime, maxPushBackDistance, maxPushBackTime, maxStunTime);
- -- size: 0 = small, 1 = large, 2 = quadruped
-
- -- 0-14%: No reaction | 15-24: pause reaction (based on stuntime) | 25-49: Hit reaction No Pushback | -- 50-74: Pushback No Float | 75+: Float
-
- -- small character
- char_DefineForceReactionProfile(0, 34.0, 5.0, 1.0, 3.0, 3.0, 0.8);
-
- -- large character
- char_DefineForceReactionProfile(1, 100.0, 10.0, 1, 5.0, 2.0, 0.0);
-
- -- quadruped character
- char_DefineForceReactionProfile(2, 100.0, 2.0, 0.8, 3.0, 3.0, 0.8);
-
- ------------------------------------------------------
- -- Set up cannon and missile autogun parameters --
- ------------------------------------------------------
- -- The following two function set the attributes (default or specific) for the cannon autoguns
- -- am_CannonAutoGunSetDefaults(trackingLagFactor, firingLagFactor, reloadTime, deactivateTimeout, activationRadius, wakeupTime);
- -- am_CannonAutoGunSetParams(autogunName, trackingLagFactor, firingLagFactor, reloadTime, deactivateTimeout, activationRadius, wakeupTime);
- --
- -- The following functions set the attributes (default or specific) for the autoguns and the tank
- -- am_MissileAutoGunSetParams(trackingLagFactor, reloadTime, deactivateTimeout, activationRadius, wakeupTime);
- -- am_MissileAutoGunSetParams(autoGunName, trackingLagFactor, reloadTime, deactivateTimeout, activationRadius, wakeupTime);
- -- am_TankSetParams(trackingLag, reloadTime, activeRadius, speed, movementForce, movementDamage);
- --
- -- The "lag factors" affect how fast the gun will rotate around and stay on target...
- -- The higher the factor, the less lag (the more accurate) the gun will be.
-
- am_CannonAutoGunSetDefaults(50, 45, 0.1, 3.0, 20.0, 0.1);
- am_MissileAutoGunSetDefaults(45, 3.0, 4.0, 20.0, 0.0);
- am_TankSetDefaults(20, 3.0, 30.0, 8, 150.0, 25.0);
-
- ------------------------------------------------------
- -- Other damage related parameters --
- ------------------------------------------------------
- -- Energy doors apply force and damage when the hulk collides with them...
- -- am_EnergyDoorSetParams(force, damage);
-
- am_EnergyDoorSetParams(100.0, 5.0);
-
-
-