x

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"

several text bindings based on one funktion

Hello i am very new in Unreal Engine development so please excuse me if I say something inaccurate.

In my UI i have like you can see on the first Picture that i have to texts which shows a counter. For every of them i have a + and - Button. which i want to use to increase and decrease the Counters.

The Couters are the ints from a Int array in my savegame. Every Counter shows a own Index of this Int Array.

alt text

This is the binding function of the first text. it just returns the int as text for the Index (SHIPINDEX) the other binding looks like this one but it returns the index 1 instead of 0.

alt text

This is the GetShipCount-function you saw in the second picture. First this looks for a savegame if there is no one it creates one with all indexes of the array = 0 (and this works well). If there is a savegame, it loads it and get the Int at the Index which is given as Input and return it.

alt text

This is the funktion which edit the Ints in the Array. First it look whether it is the +Button or the -Button. Then it loads the save game. And increase or decrease the Int at the index given as Input and save the new values to the savegame.

alt text

Now back to the Problem. For one Counter it works fine. But when i edit the second one it resets the first counter to 0 and vice versa. But i want that i can edit this Ints individual.

Thanks for helping me.

Product Version: UE 4.17
Tags:
ui.jpg (2.8 kB)
getshipcount.jpg (33.0 kB)
text-binding.jpg (37.0 kB)
more ▼

asked Jan 05 '19 at 07:47 PM in Blueprint Scripting

avatar image

GameSoldier
1 1 1

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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