A_AttachLight is causing a problem

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
SPZ1
Posts: 388
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

A_AttachLight is causing a problem

Post by SPZ1 »

Something is wrong with this A_AttachLight? :x

Code: Select all

ACTOR Stone_Arrow_Floor_Invisible 20045 {
	Scale 3.0
	Radius 2
	Height 6
	Alpha 0.0
	RenderStyle "Translucent"
	+BRIGHT
	//+DORMANT
	+ISMONSTER

	States {
		Spawn:
			EMPT AAAAAAAAAA 12 A_FadeIn(0.1)
			EMPT A 0 A_SetRenderStyle(1.0, STYLE_Normal)
			EMPT A 15 A_AttachLight("FloorArrowLight01", DynamicLight.PointLight, "Blue", 96, 96, DYNAMICLIGHT.LF_DONTLIGHTSELF)
			EMPT A -1
			Stop
	}
}

Code: Select all

Execution could not continue.
Script error, "DECORATE.lmp:decorate.lmp" line 27155:
Expected ',', got '.'.
User avatar
metalx1000
Posts: 21
Joined: Tue Apr 23, 2024 5:56 pm
Operating System Version (Optional): Debian SID
Graphics Processor: Not Listed
Contact:

Re: A_AttachLight is causing a problem

Post by metalx1000 »

Could it possibly be because
Note: this function is not fully supported by DECORATE.
If used from DECORATE, all parameters starting from ofs should be omitted.
Consider switching to ZScript to fully utilize this function.
https://zdoom.org/wiki/A_AttachLight

I have not used the A_AttachLight function myself, but I saw this message we'll looking into your problem and thought it might be the issue.
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: A_AttachLight is causing a problem

Post by ramon.dexter »

Just one simple question: why do you insist on using decorate, when programmer like you has obviosly no problem with zscript? Just write it directly in zscript and completely forget decorate and many of problems will be gone...
User avatar
SPZ1
Posts: 388
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Re: A_AttachLight is causing a problem

Post by SPZ1 »

If used from DECORATE, all parameters starting from ofs should be omitted.
All parameters from ofs are omitted.
Just one simple question: why do you insist on using decorate
Well for one... DECORATE allows me to use Map Editor Numbers and SpawnIDs. I use it to split my simpler things from my more complicated ones. I don't think this bug should exist because there is a newer way that allows things to be broken. :|
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: A_AttachLight is causing a problem

Post by Blue Shadow »

DECORATE doesn't support the <classname>.<constant> syntax. To solve this, either switch to ZScript, or, if you must stay with DECORATE, replace DynamicLight.PointLight with 0, and DYNAMICLIGHT.LF_DONTLIGHTSELF with 4.

You can find those DynamicLight constants here.

SPZ1 wrote: Fri May 17, 2024 2:48 pm Well for one... DECORATE allows me to use Map Editor Numbers and SpawnIDs
You assign those in MAPINFO nowadays, be it for DECORATE or ZScript.
https://zdoom.org/wiki/MAPINFO/Editor_number_definition
https://zdoom.org/wiki/MAPINFO/Spawn_number_definition
User avatar
SPZ1
Posts: 388
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Re: A_AttachLight is causing a problem

Post by SPZ1 »

Thank you for pointing me in the right direction :)
Post Reply

Return to “Scripting”