working with new spotlights

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

working with new spotlights

Post by ramon.dexter »

So, gzdoom 3.3 has brought us new Spotlight actors to use. They allow nice working with lights, as they are more advanced than the basic pointlights. But I wanted to know how do I define new spotlights? Something like in gldefs - the size, roll, pitch, intensity, angles, etc. I looked into gzdoom.pk3 dynlights.txt, where i found the spotlight class. But the desired properties are not defined in the actor. So I wanted to knwo, how do I define these properties for new actor.
I know I can set these properties in gzdbf, but I would like to make some pre-set lights without the need to bother with the proprties in map editor.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: working with new spotlights

Post by Apeirogon »

Spotlight variables define in parent class dynamic light

Code: Select all

	native double SpotInnerAngle;
	native double SpotOuterAngle;

	property SpotInnerAngle: SpotInnerAngle;
   property SpotOuterAngle: SpotOuterAngle;
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: working with new spotlights

Post by ramon.dexter »

Oh, nice, thanx. Had to check gzdoom.pk3 for new things then :D
Post Reply

Return to “Scripting”