Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Maisth

Switch light

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);
 }
}

 

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 ?

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×