Jump to content

How can I make a switch change global brightness?


Recommended Posts

I'm in UDMF format. I need a switch to set every sector (except a specific few) to 112 brightness, as well as lower a floor.

 

I assume I'll need to script this, but I have very limited scripting knowledge. Only ever copied a few ACS scripts so help is very much appreciated

Edited by Peaved T-40

Share this post


Link to post
On 1/18/2024 at 12:58 PM, Peaved T-40 said:

I'm in UDMF format. I need a switch to set every sector (except a specific few) to 112 brightness, as well as lower a floor.

 

Set the sectors to a specific id tag.

For the floor light you could use

112:Light_ChangeToValue (tag, value)

but it affects the ceiling as well

 

for lowering the floor use one of the floor specials

20:Floor_LowerByValue (tag, speed, height)

 

for example

Quote

 

#include "zcommon.acs"


script 1 (void)
{
    Light_ChangeToValue (1, 192);
    delay (35);
    Floor_LowerByValue (1, 4, 92);
}

 

 

 

 

 

Edited by Kappes Buur

Share this post


Link to post
On 1/21/2024 at 1:44 PM, Kappes Buur said:

 

Set the sectors to a specific id tag.

For the floor light you could use

112:Light_ChangeToValue (tag, value)

but it affects the ceiling as well

 

for lowering the floor use one of the floor specials

20:Floor_LowerByValue (tag, speed, height)

 

for example

 

 

How would I include multiple sector tags?

Share this post


Link to post
1 hour ago, Peaved T-40 said:

How would I include multiple sector tags?

 

Use the New Tag button to add more tags (bottom right)

 

Spoiler

meujE1M.png

 

in my case 17 and 51

Edited by Kappes Buur

Share this post


Link to post
4 minutes ago, Kappes Buur said:

 

Use the New Tag button to add more tags (bottom right)

 

  Reveal hidden contents

meujE1M.png

 

in my case 17 and 51

 

No, I mean, in the script, how do I write it out to include multiple tags

Share this post


Link to post
34 minutes ago, Peaved T-40 said:

 

No, I mean, in the script, how do I write it out to include multiple tags

 

First of all, set multiple tags as in my screenshot.

Then repeat the action special for each tag, for example

Quote

 

#include "zcommon.acs"


script 1 (void)
{
    Light_ChangeToValue (1, 192);
    delay (35);
    Floor_LowerByValue (17, 4, 92);

    Tagwait (17);

    Floor_LowerByValue (51, 4, 92);
}

 

You may have to also use Tagwait for the next action to work.

Edited by Kappes Buur

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
Reply to this topic...

×   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...