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"

Tappy Chicken score system for multiple maps?

Hi!

Ive just implemented a 'best time' and 'best score' counters which save in my game just like how its done in the Tappy chicken game. My problem here is when using more levels, i know i can make more variables in the save game BP for each level but how can i check which map is loaded so those certain variables are used and saved? Is there a way of creating a branch to check which level is loaded? as at the moment that's the only way i could think of doing it.

Hopefully I'm clear on what i mean but if not give me a shout :D any thoughts on how to do this would be cool :)

Cheers, Beau

Product Version: Not Selected
Tags:
more ▼

asked Aug 16 '14 at 09:37 PM in Blueprint Scripting

avatar image

Beaulamb
15 7 7 9

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

3 answers: sort voted first

Sorry for the slow reply, just saw this. Here's what I've got:

alt text 1. Save game variables - I'm using the BestTime and BestTimeArray floats and BestTimeString and BestTimeStringArray variables in my HUD which is where I do all of the Save/Load functionality. The reason for a float and a string is to give me a more streamlined visual of the actual time that only has 2 decimal points.

alt text 2. OnBeginPlay - I'm running through to see if the save game already exists and if not, creating one. In there I set the arrays based on the solo string and float defaults. The LevelInt is just an int that I cast to HUD in each level's level BP and set to the level number. This gives me the index that's then used for each level to save a best time. I can also use that to decide what level to load on death or level completion (shown below)

  1. BestTimeUpdate - Here I'm checking the time the level was finished in (called when level is successfully completed), comparing to saved best time and then updated. I also set a bool to tell my HUD to show a message announcing a new record was set.

  2. End Level Options - If the player dies, I used the currently set LevelInt to reload the same level again. All my levels are named the same with just the number after the _ being different to make it easy to keep track of. In the level BP for each level, I set the LevelInt to the level number and that's all I really need to do. If the player successfully completes the level I load the level called LevelInt+1. Simple. :)

Let me know if you need any additional info on anything. Hope this helps.

more ▼

answered Aug 19 '14 at 07:08 PM

avatar image

Gooner44
213 13 13 27

avatar image Gooner44 Aug 19 '14 at 07:09 PM

Adding the other images for

alt text BestTimeUpdate and

alt text End Level Options

hudlevelload.png (140.4 kB)
avatar image Beaulamb Aug 20 '14 at 07:15 PM

Nice work! super helpful :)

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

Ok so i made some progress on this, from the Level BP i just fired a custom event (Each level has its own custom event) from event begin play that goes to my BP with all my save stuff in which turns a branch on and then i just copy stuff for each level that i have. So it works but its a bit crazy the amount of stuff ill have to copy for each map (And end up with one crazy BP). If anyone suggests anything better just lemme know! ...or if anyone wants to see how i set it up i can upload screenshots :)

more ▼

answered Aug 17 '14 at 06:08 PM

avatar image

Beaulamb
15 7 7 9

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

What I did, just saving a 'best time' float, was use an array. In each level, I set an Int in my HUD that then I used as the Index for the array. This way, you don't have much to do each level and the logic (at least for my setup) is in one place that's always loaded (HUD).

PM if you want to see how I have it set up.

more ▼

answered Aug 17 '14 at 07:38 PM

avatar image

Gooner44
213 13 13 27

avatar image Beaulamb Aug 18 '14 at 09:06 PM

Sounds good! Would you be able to post any screenshots on here? just so if anyone else wants to see how its done too :)

(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