Renderstyle woe

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Renderstyle woe

Re: Renderstyle woe

by Blzut3 » Wed Jul 16, 2014 5:22 pm

Fixed.

Re: Renderstyle woe

by edward850 » Wed Jun 18, 2014 2:10 am

You pretty much hit the nail on the head, there.

Re: Renderstyle woe

by Blue Shadow » Wed Jun 18, 2014 1:42 am

I think I've found the culprit: the styles' ordering between LegacyRenderStyleIndices array and ERenderStyle enum doesn't match, which SetActorProperty appears to rely on when setting the appropriate renderstyle.


That or I have no idea what I'm talking about. Although, I ran the same test file above with a custom build I compiled which fixes the ordering, and it seems to produce correct results.

Renderstyle woe

by Blue Shadow » Tue Jun 17, 2014 9:47 am

Tested with: In the attached file below, there is a simple actor with renderstyle translucent, which calls an ACS script that is supposed to change its renderstyle from translucent to stencil and back to translucent. Here is the script:

Code: Select all

Script "ChangeRStyle" (void)
{
  int rstyle = GetActorProperty(0, APROP_RenderStyle);

  If(rstyle == STYLE_Translucent) SetActorProperty(0, APROP_RenderStyle, STYLE_Stencil);
  Else SetActorProperty(0, APROP_RenderStyle, STYLE_Translucent);
}
However, when tested in game, the actor changes from its preset renderstyle (translucent) to what I think is shaded, and then to stencil.

My only guess is that something probably went wrong here.
rstyle_issue.zip

Top