Hey there. I am wanting to find out how to create a star system for my game for the levels. so when the player collects All orbs the get a star, under X amount of time that’s the 2nd star sort of thing. How do I add this using Blueprints?
OH ok so that’s to award it. To show it would I just call the custom event on the level select screen? I am sorry I am still relatively new to a lot of this
you first of need to have your goals being stored as vatiables somewhere.
i suggest the GameMode here… cause it is loaded into the level first. just create a custom GameModeBase and set it in your WorldSettings as GameMode override.
Now… some pseudo Tutorial:
For the Example, add an Integer called “MaxCollectibles”.
you now need to set this Integer to the Amount of Collectibles needed to be collected, to gain a Star.
You can do that manually - or, if your Collects are based upon a special Char (f.e. a BP_CollectibleBase), you can GetAllActorsOfClass and set this special Char into… this returns an array of all Actors of this Base Class… just get the Length of that array as MaxCollectibles value.
when your Player reavhes the goal:
GetGameMode and cast it to your custom one and get the MaxCollectibles integer.
Now you can compare this with the Player collected Otems… if both match, add a star to the player…
to show them, you need a widget that shows Stars (widgets again) if the player has one/some.
I think the OP wants to know how to do the ‘widget stuff’. That’s a whole thing…
You would need to watch a lot of youtube vids about widgets
I know how to do some Widget stuff like level select and that, it is just more how to show 0 stars collected when you start, then if you complete these challenges show 1 star earned sort of thing on the level select screen. I have looked on youtube A LOT trying to find this and no one is really showing it anywhere
No he is only showing it whilst in game. What I am looking for is that like Angry Birds. where you do challenges in game and when you complete the level, it will show 0 to 3 stars achieved. Then when you go back to the Main menu, it shows how many you earned in that level. Or is this the same method you use for the main menu?
It’s basically the same as they guy is doing there, except you have one or two or three pictures next to each other. So you don’t need the in game collect stuff, just to show the right number of pics when you get back to the menu.
OH OK see I was not sure but thank you for your help. I will give it a try and see if I can get it working