Wow that was simple xDProject Dark Fox wrote:Though nice to have the if/else written out, it can be condensed to two lines:Note the lack of brackets. This works only if you have a single thing to process whatever's under the "if". The else is unnecessary and it will automatically terminate on its own.Code: Select all
script 4 (void) { if (GetActorFloorZ (0) >= 392) Teleport(1,0,0); }
Just thought I'd let you know is all.
Well, I want now to create a vent that thrusts players upwards when stepped on, but only till certain altitude.
Here I have this script, activated through ACS_ExecuteAlways so multiple players can be thrusted at once:
Code: Select all
int InSector[99];
script 1 (void)
{
InSector[PlayerNumber()] = true;
while (InSector[PlayerNumber()])
{
ThrustThingZ(const: 0, 80, 0, 0);
delay(const:1);
}
}
script 2 (void) // script to terminate Script 1
{
InSector[PlayerNumber()] = false;
}