Frisky Posted December 12, 2015 I'm making a map in GZDoom Builder for my new WAD, but for some reason, a script won't work. #include "zcommon.acs" script 1 (void) { //Open door Door_Open(1, 20); } It's supposed to make a specific door open when an enemy with a Script Execute is killed. I'm not sure what the error to this problem is and it says it's working fine in GZDoom Builder. Please help. :( 0 Quote Share this post Link to post
scifista42 Posted December 12, 2015 -Make sure that you write the script into the SCRIPTS window and not the DIALOGUE window. -Make sure that the script gets compiled - change the script text slightly, hit the Compile button and save the wad. -Make sure that the door actually has tag 1 and the enemy actually has action ACS_Execute with first argument set to 1. -Make sure that your door doesn't have neighboring sectors with low ceilings. Doors always raise up to 4 units below the lowest neighboring sector's ceiling. If none of these helps, post your wad. 0 Quote Share this post Link to post
Frisky Posted December 12, 2015 Alright, thanks. The one thing I actually needed was to set the door's tag to 1. 0 Quote Share this post Link to post
Aliotroph? Posted December 13, 2015 That's a common mistake. One thing I sometimes do with scripts when I can't tell if the code is wrong is add something like print("test1"); after a line I think might be trouble. Sometimes I pepper a script with different printouts, especially printouts of different variables. If the script fails before the print() call the print() function won't execute and I'll have an idea where the failure is. In your script it would have executed anyway and then it would point you to checking your sector tags. 0 Quote Share this post Link to post
Gez Posted December 13, 2015 Aliotroph? said:That's a common mistake. One thing I sometimes do with scripts when I can't tell if the code is wrong is add something like print("test1"); after a line I think might be trouble. Sometimes I pepper a script with different printouts, especially printouts of different variables. If the script fails before the print() call the print() function won't execute and I'll have an idea where the failure is. In your script it would have executed anyway and then it would point you to checking your sector tags. Use printbold() instead of print(). I've seen a few times people claiming a script wasn't working, even though it actually was, because the print() statements showed nothing. That's because print() only works if the script's activator is the player (so that in multiplayer, it only displays for the player who activated the script) and when the activator isn't a player at all, nothing happens. Printbold displays the text for all players so it's guaranteed to work even when the script is activated by a monster or something. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.