by Enjay » Tue Jan 04, 2022 6:18 am
For a map I have been working on, it would be useful to be able to change whether a line is repeatable or not. I am, of course, aware that there are several ways to remove a special or have a script ignore the actions of a line, but there have been a few times where it would have been best/easiest to be able to toggle whether the line was repeatable or not.
One of the most common situations where I have wanted to do this is with a switch operated line - repeatable lines always return the appearance of the switch to the off position after use. (This happens gardless of what the script does - including "brute-forcing" it to try and change the appearance by changing the texture using SetLineTexture.)
This is even more pressing where switches have several animated frames and perhaps separate on/off sounds rather than the simple on/off appearance and single sound of the default Doom switches.
So if a switch can be used many times, it needs to return to its off position to indicate that it can be used again. That's fine; that's what happens. However, if - eventually - there is one final time that the switch can be used and from that point on it is deactivated, remaining in its on appearance would look correct and give the player suitable feedback. If the repeatable nature of the switch could be turned off before that final use, setting up such a scenario would be nice and easy.
Relevant thread: viewtopic.php?f=122&t=74336
I don't know how feasible it would be, but it strikes me that adding this functionality to [wiki]SetLineActivation[/wiki] would make sense. So instead of SetLineActivation having these parameters:
SetLineActivation (int lineid, int activation);
it would have something like:
SetLineActivation (int lineid, int activation [,bool notrepeatable]);
(notrepeatable picked rather than repeatable because default should, I think, be 0/false.)
For a map I have been working on, it would be useful to be able to change whether a line is repeatable or not. I am, of course, aware that there are several ways to remove a special or have a script ignore the actions of a line, but there have been a few times where it would have been best/easiest to be able to toggle whether the line was repeatable or not.
One of the most common situations where I have wanted to do this is with a switch operated line - repeatable lines always return the appearance of the switch to the off position after use. (This happens gardless of what the script does - including "brute-forcing" it to try and change the appearance by changing the texture using SetLineTexture.)
This is even more pressing where switches have several animated frames and perhaps separate on/off sounds rather than the simple on/off appearance and single sound of the default Doom switches.
So if a switch can be used many times, it needs to return to its off position to indicate that it can be used again. That's fine; that's what happens. However, if - eventually - there is one final time that the switch can be used and from that point on it is deactivated, remaining in its on appearance would look correct and give the player suitable feedback. If the repeatable nature of the switch could be turned off before that final use, setting up such a scenario would be nice and easy.
Relevant thread: viewtopic.php?f=122&t=74336
I don't know how feasible it would be, but it strikes me that adding this functionality to [wiki]SetLineActivation[/wiki] would make sense. So instead of SetLineActivation having these parameters:
[c]SetLineActivation (int lineid, int activation);[/c]
it would have something like:
[c]SetLineActivation (int lineid, int activation [,bool notrepeatable]);[/c]
(notrepeatable picked rather than repeatable because default should, I think, be 0/false.)