playMaker

Author Topic: Return to title screen on player death  (Read 2096 times)

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Return to title screen on player death
« on: March 14, 2018, 02:31:30 AM »
Hi guys, wondering if you can help me with a minor problem.

I have a return to title screen option working with a key press, but when used to load the title screen after the players death there's a graphical problem. At the players death the screen fades to black before returning to the title screen level,.. but between them a view of the game world reappears for a second. It's that image I don't want appearing.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Return to title screen on player death
« Reply #1 on: March 14, 2018, 02:57:04 AM »
Hi,

 you need to also include a fading on your level.

 so your level as a canvas with a black image by default, and you fade this fade automatically when the level starts.

 this way you avoid this kind of issues.

also, I suggest you move away from the action fade as it uses the old UI, instead you could make a dedicated canvas with just the fade image in full screen and make that canvas persistent in your game, and survive loading which would have the same effect. and you can reuse this everywhere you need a fading.

 Bye,

 Jean

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Re: Return to title screen on player death
« Reply #2 on: March 14, 2018, 12:43:25 PM »
Hi jeanfabre,

Not sure how to fade the black image on canvas. Are we talking about a sprite animation or a way to use actions to control alpha on a material or something else? :-[

Regards Charles

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Re: Return to title screen on player death
« Reply #3 on: March 14, 2018, 02:18:46 PM »
Hi jeanfabre,

This tutorial showing a way to fade objects with Playmaker looks like a good way to do it
Regards Charles

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Return to title screen on player death
« Reply #4 on: March 15, 2018, 05:28:53 AM »
You can just stretch a single black pixel over the whole screen and change it's alpha in spriterenderer to fade, simple as that.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Return to title screen on player death
« Reply #5 on: March 15, 2018, 02:11:35 PM »
Hi,

 No need for a single pixeled texture or sprite to achieve this:)

 create a UI Image, with no sprite, set it to black color and stretch it to full screen, and that's it, animate the color value then.

 else, add a CanvasGroup and animate the alpha value if you want a cleaner value for fading.

If you need a quick sample, I'll provide.

Bye,

 Jean

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Re: Return to title screen on player death
« Reply #6 on: March 17, 2018, 07:39:04 PM »
Hi Jeanfabre,

If you could send me that example that would help.

Thanks regards Charles.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Return to title screen on player death
« Reply #7 on: March 20, 2018, 06:32:11 AM »
Hi,

 ok, New sample on the Ecosystem showing how to do a fade system:



it comes as a prefab, so you can drag it on your scene straight away. Check the fade canvas order index, but it's set to 100, so hopefully you don't have 100th of canvas, else raise that to the maximum  so that it's always on top.

Let me know if it works for you and if it make sense.

 Bye,

 Jean