How to get dynamic lights things to work?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

How to get dynamic lights things to work?

Post by Disciple-X »

I am anxious to add dynamic lights to my wad. I was wondering if someone could link me to a wad file that fully utilizes dynamic light things. Rather than have anyone try to send foum messages back and forth, it would save us all a lot of trouble if someone could link me to wad that already has properly implemented dynamic light things. I'll simply use the wad as a reference.

I playd around with the Doomdefs.lmp file, but all accomplished was changing color and size attributes to sprite props. I was not able to make my own custom dynamic light thing.
SlayeR
Posts: 120
Joined: Wed Aug 31, 2005 6:23
Location: Somewhere
Contact:

Post by SlayeR »

Doomdefs only changes the dynamic lights attached to actors. The 98XX things are placeable dynamic lights, I'm pretty sure they are documented in the 'documentation' thread.
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

Ok, gotcha. Seems pretty well explained in the thread. I'll get to work on interpreting and applying.

thanks
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

Well, the documentation seems pretty detailed. When I add the below to the script, do I literally include "argX" per color or for intensity?

thing 9800 "Point Light"
{
arg1 "Red"
arg2 "Green"
arg3 "Blue"
arg4 "Intensity"
}

Now, I tried to apply it, but wadauthor's compiler did not take it. I am actually not a adept scripter at all, and do not even know the language. I have been able to work with it enough to get fog, colored lighting, and other zdoom based features to work, but I have no real clue where to insert the GZdoom dynamic light thing information into my current script. Could someone explaine where to properly insert the light thing information? I attached my current map script below, as well as the error message the compiler gave me.

" #include "zcommon.acs"

script 1 OPEN

{
Sector_SetFade (const:5, 0, 0, 255);
Sector_Setcolor (const:5, 0, 0, 255);
Sector_SetFade (const:6, 0, 0, 255);
Sector_Setcolor (const:6, 0, 0, 255);
Sector_Setcolor (const:8, 255, 255, 234);
sector_setdamage (const:8, 255, 0);
Sector_Setcolor (const:9, 255, 255, 234);
}

thing 9800 "Point Light"
{
arg1 "Red"
arg2 "Green"
arg3 "Blue"
arg4 "Intensity"
}

Line 15 in file "$.acs" ...
$.acs:15: Invalid declarator.
> thing
> ^ "
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Post by NeoHippo »

In the Download thread is a link to dynamic lights wad

http://grafzahl.drdteam.org/gzdoom/lights.zip

which you should place into a directory called skins, under the GZDoom directory. Open it up with XWE and take a look at it.

You will find 4 lumps, XTRANSX which I was told is just a holdover from some previous project and has nothing to do with dynamic lights.
The other three, however, will show you how to setup dynamic lights, DOOMDEFS, HTICDEFS and HEXNDEFS.

Also, have a look in the Documentation thread.

As you have found out, Sector_SetFade simply sets up a tagged sector with a coloured hue but not with a dynamic light.
TAtL, tU, aE
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

ah, so it has to eb a seperate lump file then, and not applied to the current level script?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Disciple-X wrote:thing 9800 "Point Light"
{
arg1 "Red"
arg2 "Green"
arg3 "Blue"
arg4 "Intensity"
}

Now, I tried to apply it, but wadauthor's compiler did not take it.
I'm not surprised, it's not meant to be put into a script. You place an item with edit number 9800 into your map using your editor. Then you set the arguments of the thing, again in your editor, to reflect how you want the light to appear. It is all done in the editor for these dynamic light objects. You do not use any additional lumps.
Disciple-X wrote:ah, so it has to eb a seperate lump file then, and not applied to the current level script?
No, and yes. The dynamic lights that get attached to existing game things (monsters, lamps, plasma bolts etc) are defined in the extra lumps mentioned. If you just want to place a dynamic light object in a level, no additional lumps or scripting are required.
User avatar
Disciple-X
Posts: 39
Joined: Thu Jan 19, 2006 6:04

Post by Disciple-X »

Alright, got it working 100% now. Thanks a lot Enjay, you have been a big help.
Locked

Return to “GZDoom”