Jump to content

Sector lighting - candel light, or lava glow?


Zirbiss

Recommended Posts

Hey,

i would like the sector lighting to behave kinda like a slowly flickering candle, to use as a kind of lava glow effect.
How would i script something like that? Any ideas? Perhaps someone already have a method?

Share this post


Link to post

You can script something using

Light_RaiseByValue(x, y);
Delay(random(1,15));
Light_LowerByValue(x, y);
Restart;

but remember that changing light levels to sectors will obviously change the lighting on also walls and ceilings (unless you set the "absolute" flag in "brightness" for the ceiling)

Share this post


Link to post

Thanks, that looks promising.
One other question. I'm just starting to learn about scripting for Doom. How and from where do i execute this script?
I'm guessing i have to place a Thing in the sector (mapspot maybe?) and run the script from there?

Share this post


Link to post

ACS. Download the libraries and look at the tutorials for getting started on ZDoom Wiki.

Share this post


Link to post

If you map with UDMF you don't download any libraries. They are included. Simply open the Script Editor, type #include "zcommon.acs" at the top and then paste that code inside a script block.

 

Script 1 OPEN

{

Paste here

}

Share this post


Link to post
13 hours ago, Nevander said:

If you map with UDMF you don't download any libraries. They are included. Simply open the Script Editor, type #include "zcommon.acs" at the top and then paste that code inside a script block.

 

Script 1 OPEN

{

Paste here

}

Im simply going off experience, since I do map with UDMF format in SLADE, and ACS didn’t work at all until I downloaded the libraries.

Share this post


Link to post
20 hours ago, Zirbiss said:

Thanks, that looks promising.
One other question. I'm just starting to learn about scripting for Doom. How and from where do i execute this script?
I'm guessing i have to place a Thing in the sector (mapspot maybe?) and run the script from there?

 

You have a quite long journey in front of you x) It's about 2 years that I'm working with ACS and I keep on learning new stuff almost every day.

 

Anyhow, take a deep look at the wiki to find what you need.

Running a script is just an "action" (action number 80), so you can simply run every script you want to via linedef triggers, dying things, special sector action things, or you can make a script to run when a player enter the map, or even when the map loads, or when the player dies etc.

 

In this specific case, you can simply go for an OPEN script, exactly like Nevander said.

("pro" tip, you can actually name scripts instead of using numbers, so that you can have a more organized space, you just have to write the name you want between "" and you're done. To call a "string" script though, remember to check the string box when you select the action special 80 (script execute) or you won't find your script)

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