The Daily Click ::. Forums ::. Klik Coding Help ::. Layer Object Fade in/out
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
21st February, 2015 at 21/02/2015 14:46:37 -

I can get Show/Hide layer to work easily, but I can't seem to get a smooth fade in/out to work with the Layer Object.

Usually with Active Objects, I'll retrieve current semi transparency ratio, then add/subtract from that but the Layer Object doesn't allow me to do this as Semi-transparency is not available.

I tried it using the alpha-blending coefficient, which I thought would have worked, but it doesn't allow the following expression:

lyrGetLayerBnAlpha( "Layer object", MyLayerName)+1

That would work if it was using the Semi-transparency ratio, but with alpha-blending, it doesn't like it. Is there another way to easily fade a layer in/out? Thanks for any help.

 
Image

Tell 'em Babs is 'ere...

nim



Registered
  17/05/2002
Points
  7234
21st February, 2015 at 21/02/2015 15:40:09 -

If semi-transparency isn't available then you probably need to set your game's display mode to DirectX8 or 9.

I just tried this and it works, so let me know if you need an example. I'll be away from the computer for a while so here's a quick example anyway: https://app.box.com/s/aa8q2aqzvtqudwfl657g49cek2fafr3n

Edited by nim

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
21st February, 2015 at 21/02/2015 16:39:14 -

Thanks nim, that example really helped out as it confirmed that it should have worked. It seems the quotation marks are automatically deleted when you type your layer name, which is why I was getting the error.

lyrGetLayerBnAlpha( "Layer object", "test_layer")+1

Glad it was that simple.

Edit: I'm using Direct 3D9 by the way. I have access to transparency under Effects for objects such as Actives, but it's not present under layers. Regardless, this method works perfectly.

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click