unset line action?

Thu Jan 13, 2022 5:29 pm

I have lets say a repeatable door action on a line.

I want to disable this action via script.

I found SetLineSpecial(lineid, special) but it doesn't seem to do what I want. I put the linedef id as lineid, right? Because only sectors have tags. I used 0 as special. But it doesn't change anything.

Re: unset line action?

Thu Jan 13, 2022 5:36 pm

SetLineSpecial changes the special action of a line, like opening a door or teleporting, etc. That's not what you want to change. You want to change the activation. There is a SetLineActivation function but the wiki page doesn't mention anything about changing the repeatable property.

Re: unset line action?

Thu Jan 13, 2022 5:55 pm

So it looks like the actual property on the linedef is a boolean called repeatspecial but I don't see any zscript functions for checking or setting that property

Try this:
SetLineActivation(1, GetLineActivation(1) || 0x200);
change both of those 1s to be your linedef number. If it works, that would set the repeatable and something like this would clear it:
SetLineActivation(1, GetLineActivation(1) &&!0x200);

Re: unset line action?

Thu Jan 13, 2022 6:18 pm

Might be of use: viewtopic.php?f=122&t=74336&p=1209796

Re: unset line action?

Fri Jan 14, 2022 4:41 am

Thanks for the answers! I actually used a global variable now, that way I can even disable the "door" action mid way (prevent it from closing again).

script 5 (int tag) {
   if (trap_activated == false) {
      Ceiling_MoveToValue(tag, 16, 64);
      if (trap_activated == false) {
         Ceiling_MoveToValue(tag, 64, 24, 1);

The only problem left is that I can not cancel that action mid movement (because I want to force "open" even when it is currently in the process of closing). That's not possible, right?

Re: unset line action?

Fri Jan 14, 2022 4:50 am

I think only door types can be reversed while they are moving. You can, of course, set a line to be a door type via ACS and that would work but I don't know how well that suits your particular setup.