Page 1 of 1

SetActorProperty renderstyle bug

Posted: Wed Aug 27, 2014 1:45
by Major Cooke
I wasn't sure if this bug was related to GZdoom alone, or if it was affected by both Zdoom and GZdoom. I just know that I'm using GZdoom when this occurred.
Spoiler: Before the morph
Spoiler: During the effect, all items disappear successfully as intended
Spoiler: After the effect, the bug rears its ugly head
When I have items that are translucent or additive, they turn invisible properly when this script is executed. However, when they are restored, additive/translucent items show up as pure black instead. As demonstrated with the above pics, normal rendered items are fine. It's putting additive and translucent items back to their original states in which they appear to either adapt a stencil black color, or their translations are just outright set to pure black.

Code: Select all

Script "InvisibleItemToggle" (int check)
{
	if (check >= 1)
	{
		//Delay(8);
		SetActorProperty(22005,APROP_RenderStyle,STYLE_None);
		SetActorProperty(22006,APROP_RenderStyle,STYLE_None);
		SetActorProperty(22007,APROP_RenderStyle,STYLE_None);
		ACS_NamedExecute("InvisItemLoop",0,0,0,0);
	}
	else
	{
		ACS_NamedTerminate("InvisItemLoop",0);
		SetActorProperty(22005,APROP_RenderStyle,STYLE_Normal);
		SetActorProperty(22006,APROP_RenderStyle,STYLE_Add);
		SetActorProperty(22007,APROP_RenderStyle,STYLE_Translucent);
	}
}

Script "InvisItemLoop" (void)
{
	SetActorProperty(22005,APROP_RenderStyle,STYLE_None);
	SetActorProperty(22006,APROP_RenderStyle,STYLE_None);
	SetActorProperty(22007,APROP_RenderStyle,STYLE_None);
	Delay(17);
	Restart;
}

Re: SetActorProperty renderstyle bug

Posted: Wed Aug 27, 2014 8:27
by Blue Shadow
What version/build of GZDoom are you using? There was an issue with setting render styles in ZDoom through SetActorProperty, which got fixed. So, if you're using something before the fix was introduced, then it could be that issue.

Re: SetActorProperty renderstyle bug

Posted: Wed Aug 27, 2014 8:41
by Graf Zahl
Indeed, fixed quite some time ago.

Re: SetActorProperty renderstyle bug

Posted: Thu Sep 11, 2014 14:24
by Major Cooke
You are right. I was using something outdated. Thanks!