Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Gradually increase score on death UMG

Hey all, I'm a bit of a beginner in UE 4 so excuse me if you don't understand what I'm talking about.

So I've made a game based on the Endless Runner tutorials found here - https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1gbY4FN8pZuEPVC9PzQThNn1/

I have made a death UMG that is added to the viewport when the character dies. I have numbers on the death screen that will display the players distance and the players total amount of coins (both of which I already have an existing variable for). However, I don't want these numbers to just appear, I would like them to gradually increase (an example of this can be found in this users video, https://www.youtube.com/watch?v=4t-t4MJdWws. When the character dies, instead of the numbers just appearing, they gradually increase)

Does anyone know how to blueprint this??

Product Version: UE 4.16
more ▼

asked Aug 13 '17 at 08:32 AM in Blueprint Scripting

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It's really like you would think. You just count another variable to your score until it reaches your score, preferably every tick. To make things go faster, you just add by a higher number and if this variable goes over your score, you just set the variable like your score. Yes, it's simple like that. <3

more ▼

answered Aug 13 '17 at 12:11 PM

avatar image

4.2k 88 38 152

avatar image ShadowDust99 Aug 13 '17 at 12:16 PM

I've tried that but because a tick is so fast, the score is added pretty much instantly, unlike how it is shown in the video linked in my first post.

I will screenshot the code I have done later when I get back on UE 4

avatar image Ninjin Aug 13 '17 at 01:01 PM

Here is something even better. Use a timeline, make it go from 0-1. Multiply your score with that. Change the length of your timeline whatever you feel like.

avatar image ShadowDust99 Aug 13 '17 at 01:08 PM

I'm not too familiar with timelines but wouldn't this produce decimal numbers?

avatar image Ninjin Aug 13 '17 at 01:12 PM

You can just use trunc and convert to int.

avatar image RimmyD Aug 14 '17 at 02:46 AM

I don't think timelines are not available in UMG so if your logic is there it wont work.. Just replace the tick function with a simple Timer by FunctionName node and call it as often as you need it to happen, then clear the timer(or don't call it again) when you reach max.

avatar image ShadowDust99 Aug 15 '17 at 01:06 AM

Does anyone have a screenshot of the code that will do something like the death screen for the video linked in my original post?

avatar image Ninjin Aug 16 '17 at 02:01 AM

That's the wrong way, you have to show your code first, to show other people that you actually tried it. Now, you just sound like you want other people to code for you :|

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question