cyber-menace Posted March 15, 2003 I have a glitch in my map that is bothering me. Is there anyway to switch a linedef's type during gameplay with a switch? (Using scripts) For example my problem ... when I lower the floors that are set for slopes the slope causes the lower floor command to not work properly. It leaves bits and pieces of the sloped sector. I want the linedefs set for slope to change back to normal before the floors lower. Is this possible? 0 Share this post Link to post
Ichor Posted March 15, 2003 I considered mentioning this in another thread, but I changed my mind. I guess now I have an excuse to say it here, heheh. Anyway, I use this all the time and it can be quite invaluable in complex scripts and puzzles. First, give the line you want a special of Line_SetIdentification, then give it a number as if it was a sector tag. Then, if you want to add, remove, or change the special command of that line in a script, use the SetLineSpecial command. Here's an example: script 1 open { SetLineSpecial(7, 80 /* ACS_Execute */, 2, 0, 0, 0, 0); } script 2 (void) { Light_ChangeToValue(10, 180); SetLineSpecial(7, 80 /* ACS_Execute */, 3, 0, 0, 0, 0); } script 3 (void) { Light_ChangeToValue(10, 60); SetLineSpecial(7, 80 /* ACS_Execute */, 2, 0, 0, 0, 0); } This is a simple toggle light switch. Hit it once, it turns the lights on, hit it again and they go out, and it repeats. The first number is the line tag you gave it: SetLineSpecial(7, 80 /* ACS_Execute */, 2, 0, 0, 0, 0); The next number is the actual number referencing that specific command, in this case, ACS_Execute (the /* ... */ is just a comment and will be ignored by the compiler): SetLineSpecial(7, 80 /* ACS_Execute */, 2, 0, 0, 0, 0); The last five numbers are the arguments of that special command. 0 Share this post Link to post
cyber-menace Posted March 15, 2003 Hey Coolness maybe I could actually get my debris shaped pillars to lower properly now! Thanks for your help! I needed it! 0 Share this post Link to post
cyber-menace Posted March 15, 2003 I used this: script 4 (void) { SetLineSpecial (1, 0 /* Normal */, 0, 0, 0, 0, 0); Floor_LowerToLowest (10, 50); Door_Open (11, 120); } script 5 OPEN { SetLineSpecial (1, 181 /* SetSlope */, 1, 0, 0, 0, 0); } to try and get it to work. The lines tagged as 1 do not appear as slopes like I wanted it to when the game begins making the script 4 effect useless! What am I doing wrong? 0 Share this post Link to post
boris Posted March 15, 2003 Setting slopes from scripts does not work. 0 Share this post Link to post
Ichor Posted March 15, 2003 From what I see, there's nothing wrong with the script. I don't know much about ZDoom, but aren't slopes determined at the start of a map as a special sector, like scrolling floors or certain light specials? If that's the case, then that sector won't change to a slope by a script, and slopes won't go back to normal by scripts as well. In other words...what he said. 0 Share this post Link to post