Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: misterjuly on April 19, 2021, 01:11:21 PM

Title: Fading tile maps
Post by: misterjuly on April 19, 2021, 01:11:21 PM
Hello,

I need to be able to fade tile maps in and out. I see the tween fade action, but it doesn't seem to work for tile maps. Any help is appreciated! Thanks!
Title: Re: Fading tile maps
Post by: misterjuly on April 22, 2021, 07:44:51 AM
bump
Title: Re: Fading tile maps
Post by: Plancksize on April 22, 2021, 12:42:25 PM
Hello,

I need to be able to fade tile maps in and out. I see the tween fade action, but it doesn't seem to work for tile maps. Any help is appreciated! Thanks!

You need to fade the tilemap color Alpha. You can use Tween color for that.

Set tilemap color at every frame and tween color from current to the same color but with alpha 0 (for fade out).

Been working on a few tilemap actions, just getting the last touches on those, but meanwhile you can use this one (attachment) if you want, or simply using the Set Property on Tilemap color.

Title: Re: Fading tile maps
Post by: misterjuly on April 22, 2021, 02:21:41 PM
Cool! Thanks so much! I'll try it and let you know how it goes!
Title: Re: Fading tile maps
Post by: misterjuly on April 24, 2021, 11:44:10 AM
So, I'm trying to use Tween color action, but it doesn't seem to be doing anything. Here is how the action is set up. I am aware that there is a delay to start it, so I know that is not the issue. Thanks!

John Bassi
Title: Re: Fading tile maps
Post by: djaydino on April 24, 2021, 07:49:40 PM
Hi.
if you only fade the alpha, then maybe you can use a tween float (value 1 to value 0 and vice versa to fade in/out

and use that float with the set color action.

as i don't think the set color works with tilemap
Title: Re: Fading tile maps
Post by: Plancksize on April 24, 2021, 11:18:52 PM
So, I'm trying to use Tween color action, but it doesn't seem to be doing anything. Here is how the action is set up. I am aware that there is a delay to start it, so I know that is not the issue. Thanks!

John Bassi

Not sure if that's a Unity Tilemap, since Tween Color should give a warning about the tilemap not having the correct component on it, but if it actually is an Unity's Tilemap, Tween won't work on it.
To do that you need to Tween a Color Variable and use that Variable (on same State, at Everyframe) on either a Set Property - Color or with the Action I posted above.
I'll attack a couple images to help.
Title: Re: Fading tile maps
Post by: djaydino on April 25, 2021, 08:46:01 AM
Hi.
Maybe you can update the 'Tilemap Set Color' action the same way as other Set Colors actions where you have rgba separate :)

Have a look at Set Sprite Color or Ui Graphics Set Color :)