Remember 2023, and box fights were all the rage?
Time to make a advanced build mechanic cause why not?
Also, inspired by @Kat_aronii a guest will be joining us today. Say hello to Astra!
Hi Guys! I’m astra, but y’all can call me Sammy.
Anyways, into the guide!
UI Features.
Concept
My concept is a lot different from others. Instead of a billion different buttons clogging the screen, I am going to make it out of overlays!
ooh! But how?
Basically, I am going to be making it like a scroll feature. You click the build button, then there is going to be a button in top right saying “Build” then, if you click it, in its place will be a button saying next, and a button in top right saying Metal. If you click next, you will scroll to the next material, so instead of metal, it will be wood, then brick, then metal.
How To Build the Scrolling Feature
Ok, so the Scrolling Feature is quite simple.
Really
Yeah! First, make a button
with this setting:
You mean overlay.
Yes,anyways, once you click the button, you deactivate it.
like this :
Oh, so it deactivates after you click it!
Yep! then, you make a overlay (this is the “Next” button. )
and wire the wire repeater to it.
with these settings :
Then make the overlay increase a counter, and that counter has these settings:
- Player Scope
- Linked to property “Switch”
- Starts at 1
- Target is 4
- Not visible in game.
Then use a wire repeaters so that the counter will reset if you hit target. (you guys should know how to do that)
WHOOO HOO! Are we done?
Nope, not even close!
What you do now is actually make the property that is supposed to be connected to the counter.
Arn’t you supposed to do this step first…
Never Mind!
Anyways, make it a number property.
Of course
Remember the first overlay?
The one that starts everything?
Well, wire that to another overlay, with these settings.
Then, what you do is:
Finally! A Fullscreen screenshot!
Oh, so you guys like these better?
Better for the EYES
OK, then.
Anyways, that should be the scroll feature done.
Some things to double check :
- Is everything player scoped?
- Does it work?
- Does the first two overlays broadcast on switch materials when clicked?
Now onto the checking!
Checking
Basically, we check if the player has the right amount of MATERIALS!
You know that you need bricks to make a brick wall right?
Nah, really?
LOL
Anyways, make three checkers.
like this
and for checker NO #1
Make the Value, 1
Checker NO #2
Make the Value 2
etc…
Then, in each checker, check if you have the right amount of materials. So 2 Checks in a checker.
Checker NO #1 is for Metal, so you want to check to see if you have the right amount of silver seeds or something.
Chicken Nuggets?
No Silver nuggets dumdum.
I love dumdums!
anyways, for all the checkers, you must have this setting.
So both checks must pass.
Then a counter.
Make target 3.
When checkers fail, increase this counter. If the target is reached, hide all of the overlays except the first one, and reset counter. So basically if all of them fail, reset.
Last part! Buttons!
The Buttons
Basically, this part is the most tedious.
Make buttons in a grid array, and then make them show, only if their respective checker works.
If checker passes → broadcast on " Metal check pass"
If receiving on “Metal check pass” → Acitvate buttons.
So you activate all the metal buttons on this channel.
Does this mean we have to have 3 arrays for each of the materials?
Yes, sadly.
Finnally, once button clicked, broadcast “PLACED METAL!” and all metal buttons are disabled on “PLACED METAL!”
You can also have a overlay that says cancel, and can reset like said above. By broadcasting “PLACED” and hiding all overlays.
If placed, you must remember to subtract the amount from the player by using item granters.
Explaination
First, lets explain the UI.
UI stands for user interface, basically the screen, and stuff on it.
Right!
Now, the UI is basically, the scroll feature. Like in a multiselect popup, but it is OVERLAYS!
You click next, and you “scroll” to the next material.
Oh! And if you scroll all the way to metal, then click it, it will select metal!
Yep! You got it!
Then, comes the checking system.
If you select “metal” It will check for the necessary materials then activate the buttons.
So, you have to have enough materials
in order to build?
YES! Anyways, once the check passes, then it activates the buttons!
When you hit the button, It will show the prop, then subtract the necessary materials.
Then deactiavte.
Or, for a challenge, you could make buttons only deactivate if you hit a cancel overlay, orif you lack the materials.
Thanks for reading!
Hope this clears some of the confusion.
Ty to ALL HAIL QUEEN @Blizzy
for the idea.
Whoo.
That was a big one astral
I know right!
Welp, cya later guys!
BYE!!!