SSTB: added tractor beam/forcefield with customisable PhysicalZone parameters

use SSTB from NewbiesNexus.mis
This commit is contained in:
loop 2025-10-16 14:47:44 +01:00
parent 3e82474303
commit 4f0291118b
4 changed files with 95 additions and 23 deletions

View file

@ -13,11 +13,11 @@
//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
Team_Hunters_timeLimit = "25";
musicTrack = "ice";
Team_Hunters_timeLimit = "25";
cdTrack = "5";
powerCount = "0";
Hunters_timeLimit = "25";
powerCount = "0";
new MissionArea(MissionArea) {
area = "-1008 -1032 2144 2080";
@ -63,11 +63,11 @@ new SimGroup(MissionGroup) {
cullDensity = "0.3";
customArea = "0 0 0 0";
coverage = "0";
XDimOverSize = "0";
position = "0 0 0 1";
GraphFile = "Scarabrae_nef.nav";
coverage = "0";
rotation = "0 0 0 0";
XDimOverSize = "0";
GraphFile = "Scarabrae_nef.nav";
YDimOverSize = "0";
scale = "1 1 1";
conjoinBowlDev = "20";
@ -245,6 +245,7 @@ new SimGroup(MissionGroup) {
homingCount = "0";
team = "0";
Target = "33";
locked = "false";
};
new InteriorInstance() {
@ -266,6 +267,8 @@ new SimGroup(MissionGroup) {
homingCount = "0";
team = "0";
Trigger = "7610";
Target = "34";
locked = "false";
};
new StaticShape() {
@ -277,6 +280,8 @@ new SimGroup(MissionGroup) {
homingCount = "0";
team = "0";
Trigger = "7612";
Target = "35";
locked = "false";
};
new InteriorInstance() {
@ -298,6 +303,8 @@ new SimGroup(MissionGroup) {
homingCount = "0";
team = "0";
Trigger = "7615";
Target = "36";
locked = "false";
};
};
@ -372,6 +379,8 @@ new SimGroup(MissionGroup) {
dataBlock = "SolarPanel";
lockCount = "0";
homingCount = "0";
Target = "37";
};
new StaticShape() {
position = "-158.234 132.947 290.416";
@ -380,6 +389,8 @@ new SimGroup(MissionGroup) {
dataBlock = "SolarPanel";
lockCount = "0";
homingCount = "0";
Target = "38";
};
new StaticShape(MainInventory) {
position = "-158.549 153.858 241.953";
@ -389,17 +400,10 @@ new SimGroup(MissionGroup) {
lockCount = "0";
homingCount = "0";
inUse = "Down";
notReady = "1";
};
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";
Trigger = "7626";
inUse = "Down";
Target = "39";
};
new Marker(BankSpawn) {
position = "-155.307 126.636 243.233";
@ -413,10 +417,17 @@ new SimGroup(MissionGroup) {
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "BankTeleporter";
lockCount = "0";
homingCount = "0";
Desc = "Static Aim Trainer\nShoot static targets while in the air to score points!\nMove faster to score more points and have fun!";
destination = "ATLSpawn";
desc = "Static Aim Trainer\nShoot static targets while in the air to score points!\nMove faster to score more points and have fun!";
};
new ForceFieldBare(TractorBeamFront) {
position = "-142.101 65.701 103.021";
rotation = "1 0 0 0";
scale = "10 40 140";
dataBlock = "TractorBeamFF";
velocityMod = "1.0";
gravityMod = "-2.75";
appliedForce = "0 0 0";
};
};
new SimGroup(AimTrain) {
@ -478,8 +489,10 @@ new SimGroup(MissionGroup) {
dataBlock = "BankTeleporter";
lockCount = "0";
homingCount = "0";
Desc = "\nWelcome back to the Bank!";
destination = "BankSpawn";
Target = "42";
Desc = "\nWelcome back to the Bank!";
};
new Marker(ATLSpawn) {
position = "-546.054 112.086 223.904";

View file

@ -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();
}
}

View file

@ -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");

View 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);
}