playMaker

Author Topic: How to make Score Number fading popup (as text)  (Read 951 times)

Neikke

  • Full Member
  • ***
  • Posts: 134
How to make Score Number fading popup (as text)
« on: June 10, 2019, 08:31:50 PM »
Hi,

I have a few destroyable objects in my game for crashing which, player gets some certain amount of score points. But I would also like to show it visually. So I was wondering what's the correct approach for making score amount (as text) popping up vertically and fading out slowly (or scaling from 100% to 0)

Should I create text inside Canvas group and then reference it from there in my FSM or any other ways around? Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to make Score Number fading popup (as text)
« Reply #1 on: June 11, 2019, 08:46:17 AM »
Hi

For text its best to use canvas.
But to reference you can do from any fsm.

to fade you can use some ui color action and a float interpolate.
use the variable from the interpolate (min 0, max 1) on the alpha variable in the color action.
also turn on every frame on the ui color action

Neikke

  • Full Member
  • ***
  • Posts: 134
Re: How to make Score Number fading popup (as text)
« Reply #2 on: June 11, 2019, 12:15:05 PM »
Sorry didn't get the point about referencing.. Could you please give some more info? Should I create ordinary text object inside my Main Canvas group and then drag this Text object to some UI action in Playmaker?