Maisth Posted March 29, 2017 Hello everybody my question here its how you make a Switch light with scripts in doom? kinda like the ones in Duke Nukem 3D. 0 Quote Share this post Link to post
1 snapshot Posted March 29, 2017 (edited) int lightstate; //Is the light on or off ? script 1 (void) //trigger it with ACS_Execute { If(LightState == 0) { LightState = 1; light_fade (SectorTag,200,Tics); } else { LightState = 0; light_fade (SectorTag,20,Tics); } } Edited March 29, 2017 by dmg_64 0 Quote Share this post Link to post
0 Maisth Posted March 29, 2017 (edited) Thanks Edited March 29, 2017 by Maisth 0 Quote Share this post Link to post
0 snapshot Posted March 29, 2017 (edited) Ah weird formatting, You should include that line with your script, compile it and use the ACS_Execute (should be named execute script or something like that) linedef effect on a switch to execute it, and let it do the rest. int lightstate; //Is the light on or off ? Edited March 29, 2017 by dmg_64 0 Quote Share this post Link to post
0 snapshot Posted March 29, 2017 Make sure to put #include "zcommon.acs" before anything in the script editor. 0 Quote Share this post Link to post
0 Maisth Posted March 29, 2017 6 minutes ago, dmg_64 said: Ah weird formatting, You should include that line with your script, compile it and use the ACS_Execute (should be named execute script or something like that) linedef effect on a switch to execute it, and let it do the rest. int lightstate; //Is the light on or off ? Gotcha now its working thanks for the heads up 0 Quote Share this post Link to post
0 Bauul Posted March 30, 2017 21 hours ago, Maisth said: Gotcha now its working thanks for the heads up Make sure you set this question as "answered" if you're happy with the results. 0 Quote Share this post Link to post
Question
Maisth
Hello everybody my question here its how you make a Switch light with scripts in doom? kinda like the ones in Duke Nukem 3D.
Share this post
Link to post
7 answers to this question
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.