mirror of
https://github.com/tribes2/SkillSector.git
synced 2026-03-10 07:50:40 +00:00
SSTB: added tractor beam/forcefield with customisable PhysicalZone parameters
use SSTB from NewbiesNexus.mis
This commit is contained in:
parent
3e82474303
commit
4f0291118b
4 changed files with 95 additions and 23 deletions
|
|
@ -12,7 +12,6 @@ function resetDummyPosition(%this) {
|
|||
%this.setvelocity("0 0 0");
|
||||
}
|
||||
|
||||
|
||||
function atsessionEnd(%player) {
|
||||
echo("session ended");
|
||||
%player.aim_training = 0;
|
||||
|
|
@ -117,4 +116,4 @@ function findAndReplacePlaceholders() {
|
|||
// Don't replace placeholder entities in development mode
|
||||
if ($DEVMODE == 0) {
|
||||
findAndReplacePlaceholders();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SkillSector game has a README.md, read that instead.
|
||||
// SkillSector has a README.md, read that instead.
|
||||
|
||||
// author: loop
|
||||
// date: 10/2025
|
||||
|
|
@ -35,4 +35,5 @@ if ($DEVMODE) {
|
|||
|
||||
// Load the various modes, datablocks and functions.
|
||||
exec("scripts/SkillSectorTeleporter.cs");
|
||||
exec("scripts/SkillSectorAimTrainer.cs");
|
||||
exec("scripts/SkillSectorAimTrainer.cs");
|
||||
exec("scripts/SkillSectorTractorBeam.cs");
|
||||
59
scripts/SkillSectorTractorBeam.cs
Normal file
59
scripts/SkillSectorTractorBeam.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
// added for the TractorBeam PhysicalZone
|
||||
datablock ForceFieldBareData(TractorBeamFF)
|
||||
{
|
||||
fadeMS = 1000;
|
||||
baseTranslucency = 0.30;
|
||||
powerOffTranslucency = 0.30;
|
||||
teamPermiable = true;
|
||||
otherPermiable = true;
|
||||
color = "0.0 0.55 0.99";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
// targetNameTag = 'Force Field';
|
||||
// targetTypeTag = 'ForceField';
|
||||
|
||||
// texture[0] = "skins/forcef1";
|
||||
// texture[1] = "skins/forcef2";
|
||||
// texture[2] = "skins/forcef3";
|
||||
// texture[3] = "skins/forcef4";
|
||||
// texture[4] = "skins/forcef5";
|
||||
|
||||
framesPerSec = 5;
|
||||
numFrames = 5;
|
||||
scrollSpeed = 15;
|
||||
umapping = 1.0;
|
||||
vmapping = 0.15;
|
||||
};
|
||||
|
||||
// Original 'tractor beam' physical zone
|
||||
// new PhysicalZone(TractorBeamFront) {
|
||||
// position = "-142.042 106.838 82.3519";
|
||||
// rotation = "1 0 0 0";
|
||||
// scale = "1 1 1";
|
||||
// velocityMod = "1";
|
||||
// gravityMod = "-3";
|
||||
// appliedForce = "0 0 0";
|
||||
// polyhedron = "0.0000000 0.0000000 0.0000000 10.0000000 0.0000000 0.0000000 -0.0000000 -40.0000000 -0.0000000 -0.0000000 -0.0000000 160.0000000";
|
||||
// };
|
||||
function TractorBeamFF::onAdd(%data, %obj)
|
||||
{
|
||||
GameBaseData::onAdd(%data, %obj);
|
||||
// z0dd - ZOD, 5/09/04. From Syrinx mod - Associate this PZ with the force field directly
|
||||
%obj.pz = new PhysicalZone() {
|
||||
position = %obj.position;
|
||||
rotation = %obj.rotation;
|
||||
scale = %obj.scale;
|
||||
polyhedron = "0.000000 1.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
|
||||
velocityMod = %obj.velocityMod;
|
||||
gravityMod = %obj.gravityMod;
|
||||
appliedForce = %obj.appliedForce;
|
||||
ffield = %obj;
|
||||
};
|
||||
%obj.originalscale = %obj.getscale();
|
||||
%pzGroup = nameToID("MissionCleanup/PZones");
|
||||
if(%pzGroup <= 0)
|
||||
{
|
||||
%pzGroup = new SimGroup("PZones");
|
||||
MissionCleanup.add(%pzGroup);
|
||||
}
|
||||
%pzGroup.add(%obj.pz);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue