Script issue - Line_setBlocking

Sat Jan 15, 2022 12:49 pm

Hi, I've a sector enclosed with a low wall, that I've got a block_player flag on so they can't hop over it.
I want to be able to run a script to fire the player out of the sector using the following ACS where I remove the block_player flag then reapply it-

Line_SetBlocking(83,0,4);
ThrustThingZ(1000, 256,0,1);
delay(1);
ThrustThing(random(0,255),256,1,1000);
Line_SetBlocking(83,4,0);

Problem is, it doesn't seem to wait for the Line_SetBlocking action to have been applied before thrusting the player - they can't leave the sector.
If I run another script to just remove the line blocking flag then it will work okay, but I don't want to have to have 2 activation steps.
It's as if all the steps are ran synchronously rather than in order
Any ideas?
Ta.

Re: Script issue - Line_setBlocking

Sat Jan 15, 2022 1:00 pm

You remove the line flag and then reapply it 1 tic later, without waiting for the player to actually be sent through it.
You will have to add another Delay after the ThrustThing but before Line_SetBlocking.
That delay will need to be longer to allow the player to pass through the line before setting the block again.

Re: Script issue - Line_setBlocking

Sat Jan 15, 2022 1:44 pm

You may be right, and that may be another issue - however even if I don't reset the line blocking, the player doesn't get through?

Edit - got it working, I needed a short delay after the first line_setBlocking

Line_SetBlocking(83,0,4);
delay(10);

ThrustThingZ(1000, 256,0,1);
delay(1);
ThrustThing(random(0,255),256,1,1000);

delay(35);

Line_SetBlocking(83,4,0);

Thanks.