Jump to content
  • 0

Switch light


Maisth

Question

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

  • 1

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 by dmg_64

Share this post


Link to post
  • 0

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 by dmg_64

Share this post


Link to post
  • 0
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

Share this post


Link to post
  • 0
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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...