Undo Line Special
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Undo Line Special
Well, let's say I have given one line a walkover linespecial, which displays a text everytime you try to walk over it.
Now, I want, that this script is no more displayed, if I have executed a special script. How to do?
Now, I want, that this script is no more displayed, if I have executed a special script. How to do?
Two ways spring to mind.
Make the text line a line id (type 121 I think) and use an open script to set the line special to run the text script. Then when your special script executes, it has an instruction in it to either change or remove the special from the line that prints the messages.
or
Have the text script check for a variable. If false, print the text, if true print nothing. Have your special script change the variable.
Make the text line a line id (type 121 I think) and use an open script to set the line special to run the text script. Then when your special script executes, it has an instruction in it to either change or remove the special from the line that prints the messages.
or
Have the text script check for a variable. If false, print the text, if true print nothing. Have your special script change the variable.
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
I thought he wanted the line to be repeatable until the second script had been run because of this...Bio Hazard wrote:just set the line to not be repeatable...
Tormentor667 wrote:which displays a text everytime you try to walk over it.
I usually use Hirogen2's way of clearing a line. If you want to clear multiple lines, either give them the same id, or just list them all in the script that is clearing the special.Tormentor667 wrote:And what do I have to do, if I want to clear another line's specia`l?
eg
setlinespecial(1, 80, 10, 0, 0, 0, 0);
setlinespecial(2, 80, 11, 0, 0, 0, 0);
that sets up 2 lines (id 1 and 2) to run 2 different scripts (10 and 11). To clear them use:
setlinespecial(1, 0, 0, 0, 0, 0, 0);
setlinespecial(2, 0, 0, 0, 0, 0, 0);
Not sure if all the 0's are needed, but it works.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
You need to use Setlineblocking.
eg
Setlineblocking(200,BLOCK_EVERYTHING); //Block anything from crossing lines with id 200
Setlineblocking(200,off); //removes blocking from lines with id 200
You'll find the details here:
http://zdoom.doomworld.com/reference/acsintern.html
eg
Setlineblocking(200,BLOCK_EVERYTHING); //Block anything from crossing lines with id 200
Setlineblocking(200,off); //removes blocking from lines with id 200
You'll find the details here:
http://zdoom.doomworld.com/reference/acsintern.html
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
Re: Undo Line Special
Sounds like you need ACS_ExecuteAlways.Tormentor667 wrote:Well, let's say I have given one line a walkover linespecial, which displays a text everytime you try to walk over it.
No, the zeroes are usually not needed. ACS_Execute(script, map, arg1) also works if the script only takes one arg. Try.
