DarkShroom Posted September 12, 2018 (edited) can you set a light color by script (a dynamic light Thing:Light) like you can set sector color and light level? thanks 0 Share this post Link to post
4 Bauul Posted September 12, 2018 I've always just set up multiple lights with all the colors I needed, and then used Thing_Activate and Thing_Deactivate to turn on just the colors I wanted. 3 Share this post Link to post
1 Empyre Posted September 12, 2018 Oh, you are using dynamic lights! I misunderstood, and thought you were using a thing to set the sector's color. I just thought of an idea. You could have multiple light things, one for each color you want, and use Thing_Activate and Thing_Deactivate to choose which one is active. 0 Share this post Link to post
0 Empyre Posted September 12, 2018 If you want to change the color of a sector with a script, you can use Sector_SetColor, but as it says on that page: Quote If your map is in the UDMF format, and you don't intend to modify sector colors later on, you can apply colors without the use of this special under the sector's custom tab. The color must be provided in hex, i.e. RRGGBB. Additionally, desaturation can be applied in UDMF as well. The values for desaturation are in fixed point, meaning 0 is normal, and 1 is fully desaturated. 0 Share this post Link to post
0 DarkShroom Posted September 12, 2018 i am able to do that already what i was doing was i have marked the outside sectors with a tag and can change the outside light and fog settings with a script, i want to change the lights in the scene that are near the windows to the same colour as the the outside color i wanted to store the various light levels in script and use tags as this allows me to change everything at once i can't find a command that would set the RGB of the light thing actually even if there was a shotcut to select all things of a certain tag this would be half way there, i'd not be able to change the values in game but this may not be so important anyway i wanted to do it this way as it saves time as i tested out the different colours and change my mind about the background etc 0 Share this post Link to post
0 Bauul Posted September 12, 2018 10 minutes ago, DarkShroom said: actually even if there was a shotcut to select all things of a certain tag this would be half way there, F3 is your friend. You can search for all kind of specifics using it. 0 Share this post Link to post
0 DarkShroom Posted September 12, 2018 1 minute ago, Bauul said: F3 is your friend. You can search for all kind of specifics using it. okay for my immediate workflow that is epic, that's the sort of thing i need, much thanks (now i can continue with the tag strategy) can i leave the question still open though if there is a way, as it's be pretty neat in my script to mess with the lights and sector levels simultaneously for a scripting thunder effect for example I thought i had a lead with the "sector light" based on a zdoom forum thread, however it just seems to copy the sector intensity not the colour 0 Share this post Link to post
0 Empyre Posted September 12, 2018 My suggestion is to not use a thing to set the color, but set the initial color directly on the sector itself, and then use Sector_SetColor to change it in your script. You can set Lightning mode in MAPINFO, and then use Light_ForceLightning to change it, as desired, or just use Light_ForceLightning without setting it in MAPINFO. 0 Share this post Link to post
0 DarkShroom Posted September 12, 2018 yes but it is the light itself, it's colour i want to change (and maybe the intensity to) it is near the windows so it looks like light is leaking in the room, it is supposed to be the same colour as outside set by script i can change the sector colours already, it was whether i can set the colour of a light itself by script.... so say i go okay let's use green, the outside will be changed to green in sector light but also the light leaking in the window goes green at least anyway with f3 i can select all the lights in the map quickly and change the colour, just not dynamicly 0 Share this post Link to post
0 Nevander Posted September 12, 2018 Yes you can't change dynamic light color by ACS, which is a shame. But as Empyre and Bauul said, using two lights with tags and colors you can pick and choose with Thing_Activate/Deactivate. 0 Share this post Link to post
0 Empyre Posted September 12, 2018 19 minutes ago, Nevander said: Yes you can't change dynamic light color by ACS, which is a shame. But as Empyre and Bauul said, using two lights with tags and colors you can pick and choose with Thing_Activate/Deactivate. Oh, I didn't notice that Bauul had already had the same idea I had. 0 Share this post Link to post
0 DarkShroom Posted September 13, 2018 (edited) ah sorry i missed that answer before a reply (activate/deactivate) it wouldn't have achieved what i wanted unfortunatly, which was i essentially am setting up like a profile in the gzdoom script where i could decide red fade outside, red light at 128, then light inside at 96 etc so everything got changed at once and i could just make nice architecture and then test it with different light settings F3 at least means i don't have a knightmare for this, i can at least select all the lights at once so it's the single best result i got from this question... it looks like that feature was essential.... oh god i wish tags could be WORDS!!! (welcome to doom huh) anyway thanks for all the info so i know where i stand, as just a final thing though i thought this one:https://zdoom.org/wiki/SetActorProperty might have some change of doing what i wanted, but the lights not an actor right? it really does seem weird to not have like a ThingSetProperty and to have enumerators for the properties like the R G B on the lights etc 0 Share this post Link to post
0 Bauul Posted September 13, 2018 10 minutes ago, DarkShroom said: it really does seem weird to not have like a ThingSetProperty and to have enumerators for the properties like the R G B on the lights etc Well if you're that passionate about it, why not program it yourself? You seem to know your way around code. GZDoom is a community effort: every single non-vanilla feature you see (which is almost everything in the game by now) was programmed by someone in their spare time. There's likely a good reason adjusting the RGB of dynamic lights isn't currently accessible in ACS, but if you hop on over to the ZDoom forums or even the ZDoom Discord, that'd be a good place to start. 1 Share this post Link to post
0 DarkShroom Posted September 14, 2018 20 hours ago, Bauul said: Well if you're that passionate about it, why not program it yourself? You seem to know your way around code. GZDoom is a community effort: every single non-vanilla feature you see (which is almost everything in the game by now) was programmed by someone in their spare time. There's likely a good reason adjusting the RGB of dynamic lights isn't currently accessible in ACS, but if you hop on over to the ZDoom forums or even the ZDoom Discord, that'd be a good place to start. it's not always that simple, you can't just add a feature and expect it to be added to the main source tree... if i do that i'll essentially be eliminating myself out of the official codebase... i have no idea who runs or controls the project, it can be very complicated getting in the inner circle of an open source product also i'd also be needing zandorum and gzdoom to support it getting a feature like this isn't just being able to code, it's convincing the rulers that be of two seperate open source projects that this idea is valid i was gonna find out why actually anyway... but i suspect that they're more interested in zscript on the zdoom forum... i can't use this as zandorum does not support it... they probably created zscript to get around all these issues (as well as offer standard normal things like arrays you can resize etc) 0 Share this post Link to post
0 Bauul Posted September 14, 2018 1 hour ago, DarkShroom said: it's not always that simple, you can't just add a feature and expect it to be added to the main source tree... if i do that i'll essentially be eliminating myself out of the official codebase... i have no idea who runs or controls the project, it can be very complicated getting in the inner circle of an open source product So pop on over to over to the ZDoom forums or Discord and ask what the process is! If you could work out how to implement it without breaking anything else there's no reason why it wouldn't be a candidate for merging into the main branch. As a starting point, why not check out the GZDoom github and see if you can identify why this isn't a feature in the code? Zandronum is based on (albeit a much older version of) GZDoom so possibly code improvements would be compatible across the two. I'm guessing that you're creating a multiplayer map, which is why you're targeting Zandronum? 0 Share this post Link to post
can you set a light color by script (a dynamic light Thing:Light) like you can set sector color and light level?
thanks
Share this post
Link to post