I recently updated to 3.1.2 SP1, and I've been noticing some issues relating to character transparency. I haven't been able to thoroughly look into this yet, so it might be that I'm just overlooking something.
Previous versions of AGS 3+ had a weird fade in/ out effect where the sprite would bleach out to white, before fading. It looked kind of funky. The latest version fades in/ out as expected.
However, I've ceuurently got two issues that have suddenly sprung out of nowhere. Firstly, in rep_exec:
[code]
if (bFadeOut)
{
if (cDan.Transparency < 100) {cDan.Transparency++;}
if (cDan.Transparency >= 99)
{
// do whatever!
bFadeOut = false;
}
}
[/code]
Works fine! cDan fades out nicely. But in reverse:
[code]
if (bFadeIn)
{
if (cDan.Transparency > 0) {cDan.Transparency--;}
if (cDan.Transparency <= 0)
{
// do whatever!
bFadeIn = false;
}
}
[/code]
This way round the code seems to hang - it won't take anything off cDan.Transparency whatsoever.
Ok, so possibly my fault. I'm looking into it, but there's nothing obvious like cDan.Transparency = 100; in rep_exec_always or anything. This one's odd too:
[code]
if (whatever)
{
// do stuff..
// do more stuff...
// do a bit more stuff....
oDan.Visible = false;
cDan.Transparency = 0;
}
[/code]
Ok, this flips from a Dan object to Dan the character after a cutscene.
In the previous cut of AGS it'd happen simultaneously, so the transition was seemless. Since the update, what seems to happen is that oDan.Visible = false doesn't take place until after we drop out of the rep_exec loop (after some Wait(x)s etc). So the two are on screen at the same time, until we drop out.
This is all code that pre-update was working fine... is this a known issue somewhere that I've missed? Something relating to changing character transparency properties in a loop?
Any advice would be awesome.