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"

How to show multiple instances of a variable(scores) for a short amount of time, during the same time.

Sorry for the title, and my englando.

Im doing a scoring system for my game. SO far I have a totalScore variable that stores the total score of the player (duh). And a addPoints that stores the amount of point a player gets when triggering stuff; finishing a mission, colliding in objects that gives points.

So system is a UMG widget with binded variables to show the scores and points.

What I need it to do: I need it to not just show the current addPoints value, but when addPoints gets changed it will show that value for a set amount of time (lets say 3s), and if during that time, addPoints get updated again it will show another instances of the variable(with the other value) for the same amount of time (3s). And after the time is up for the instance it dissapears.

I hope you can help me, cuz I really cant figure this one out, thanks. <3

Product Version: UE 4.12
more ▼

asked Oct 05 '16 at 06:19 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

I think I understand what you mean. You want something like a message log that automatically fills up with the new added scores and clears out if no score is added for a few seconds?

In that case, what I would do is have a UMG widget called ScoreList with an empty vertical box marked as a variable, and whenever the player triggers something that gives him score, call a function in ScoreList which spawns another widget blueprint, let's call it ScoreRow, and adds it into the ScoreList vertical box. ScoreRow would have a text with the points added, and on beginplay it would play a FadeIn (or SlideIn might look nice) animation, delay 3 seconds, then play that FadeIn backwards, delay for 1 second more and then RemoveFromParent. You can use the pivot location on the ScoreList to determine which way the list should grow, if newer rows should be fixed on the bottom or be placed underneath the existing ones etc. If you want the newer ones to be on top, I think there should be a way to specify exactly where in the list the new row should be added (it should be added as the first child in that case).

more ▼

answered Oct 05 '16 at 06:51 AM

avatar image

177 13 16 29

avatar image Everath Oct 05 '16 at 07:04 AM

Ah thank you, thats what I need! I will try do do it, but Im rather new to UE so feel like I will run stuck pretty fast :x

avatar image Acriax Oct 05 '16 at 07:37 AM

Don't worry, there are tutorials on youtube for almost any aspect of UE4. Just think of it as a puzzle game and have fun solving the issues you run into and you'll learn as you go and become a pro in no time!

(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