Bedwars has Armor, so why not make it? Well, let me show you how.
Similar to this guide:
But different
Granting the Armor/Shield
First of all, set your starting shield to 0%. You can make you start with however much health you want. 200 is the regular when you have shield, so maybe that? Make sure your Max amount of shield is 100.
Have 4 Health Granters.
Health Granter #1:
Grants: 25 SHIELD
Grant on: Leather Armor
Health Granter #2:
Grants: 50 SHIELD
Grant on: Gold Armor(Gold is worse than Iron!)
Health Granter #3:
Grants: 75 SHIELD
Grant on: Iron Armor
Health Granter #4:
Grants: 100 SHIELD
Grant on: Diamond Armor
Now, make your shop. I will be using a Popup Shop.
Have a Popup like this:
Title: Buy Leather Armor
Content: Grants 25 Shield
Primary CTA: Purchase
Primary CTA Channel: TryLeather
Repeat this for all your Popups.
Have a Checker that receives on “TryLeather”.
It will check if you have
Greater Than
Your cost - 1
Example:
Type: Item Amount
Item: Snowballs
Comparison: Greater Than
Value: 99
Make the Checker transmit on “Leather Armor” when the Check Passes. Repeat this for more Armor.
Keeping your Armor/Shield when you die/respawn
Have a property like this:
Now, wire your Checker that checks if you have the amount of the item used to purchase each armor type to a trigger. Add a block for that trigger.
Leather Armor Trigger Block:
Set Property: Armor
Value: 1
Gold Armor Trigger Block:
Set Property: Armor
Value: 2
Iron Armor Trigger Block:
Set Property: Armor
Value: 3
Diamond Armor Trigger Block:
Set Property: Armor
Value: 4
Now, wire a Lifecycle with the settings of “Player Knocked Out” to a Trigger with this block:
If: Armor = 1
Do: Broadcast Message on Channel “Leather Armor”
Else If: Armor = 2
Do: Broadcast Message on Channel “Gold Armor”
Else If: Armor = 3
Do: Broadcast Message on Channel “Iron Armor”
Else If: Armor = 4
Do: Broadcast Message on Channel “Diamond Armor”
There! Now when you die, you get the set amount of Shield your armor gives!
Breaking your Armor/Shield after a number of deaths
Okay, this is pretty simple. Sorry for the picture-less of this guide, I will be adding them soon; my computer keeps reloading.
Okay, make a Counter for each type of armor.
Based on results from my poll, we will multiply the number of the armor by 2.
Armor Numbers
Leather: 1
Gold: 2
Iron: 3
Diamond: 4
Multiplied by 2:
Leather: 2
Gold: 4
Iron: 6
Diamond: 8
Now that you have the amount of times you need to die before the armor breaks(Yes, that was for that), set the target value of the corresponding Counter to your multiplied number. For example, the target for the Iron Armor Counter would be 6. Make ALL of the Counters transmit on “Reset” when the Target Value is Reached, and, well, Reset when receiving on “Reset”!
Now for the Block-code part. Wire a Lifecycle(Or a KO Manager, I prefer Lifecycles) to a Trigger with this block:
If: Armor = 1
Do: Broadcast Message on Channel “AddLA”
Else If: Armor = 2
Do: Broadcast Message on Channel “AddGA”
Else If: Armor = 3
Do: Broadcast Message on Channel “AddIA”
Else If: Armor = 4
Do: Broadcast Message on Channel “AddDA”
Now, make each of the corresponding counters increment when receiving on the corresponding channel. Wire your Leather Armor Counter to a Trigger like this:
Set Property: Armor
Value: 0
Wire the Trigger to a Respawn to make sure you have no more Armor/Shield.
Do this for every Counter, with a different Trigger for each.
Changing your Armor/Shield
Okay, first, make it so that when you buy Leather Armor, you get a Brown Seed(After the Check Passes), you get a Gold Seed after buying Gold Armor, you get a silver seed after buying Iron Armor, and you get a Cyan Seed after buying Diamond Armor.
Now, make a True/False property to for each Armor Type. Something like this:
They should ALL be set “False” on Default.
Now, wire your Checkers, so that when the Check Passes, it triggers a trigger that sets its corresponding Property(LeatherArmor, IronArmor, etc.) to True, and the others to False.
Now, make an Overlay in your Top Right Corner like this:
Wire it to a Popup that asks the player if they want to switch to Leather Armor, and so on, from Leather → Gold → Iron → Diamond. Wire your Popup to a Checker that checks if you have the corresponding seed(From before), so that Primary CTA clicked → Run Check. Then, if it passes, wire the Checker to your trigger that sets your property to 1. And so on.
Right now, there is no way to actually switch it in-game; You can only respawn and reset it; There are no Negative Health Granters. Yet.
You’re done! A would be appreciated! If you have any questions, ping me!
-@Blizzy