I need help with Loot Crates

Hi, I need help with making loot crates, I want it so you break a crate and it gives you 3 things: A random gadgit, random ammo, and either a med pack or a sheid can. Any tips on how to do that?

Prop destroyed-trigger-block code-randomizer
Guide for randomizer:

1 Like

1. The Breakable Crate (Prop with Damage)

  • Choose a Prop: Select a prop to represent your crate (e.g., a box, chest, barrel).
  • Enable Damage: Edit the prop and turn on the “Damage” option, setting the amount of health it has.
  • Add a Trigger: Place a trigger device near the prop and set it to activate “When Prop is Destroyed”.

2. Random Item Generation with Blocks

Random Gadget:*

  • Use a Blocks device connected to your trigger.
  • Create a variable (e.g., “gadgetRand”).
  • Use the “Set Variable to Random Number” block (with your desired range) to assign a random number to “gadgetRand”.
  • Use “If” blocks to check the value of “gadgetRand” and broadcast on different channels based on the outcome. Each channel will correspond to a different gadget (e.g., channel “gadget1” for the zapper, channel “gadget2” for the snowball launcher, etc.).
  • Place multiple Item Granters, each set to a different gadget and wired to their respective channels.
  • Random Ammo:
    • Repeat the process for the ammo, using a new variable (“ammoRand”) and corresponding “If” blocks and channels for different ammo types (e.g., “ammo1” for light shards, “ammo2” for medium shards).
    • Place Item Granters for the different ammo types, wired to their respective channels.
  • Med Pack OR Shield Can:
    • Use a new variable (“healthRand”).
    • Assign a random number to “healthRand”.
    • Use an “If” block (e.g., if “healthRand” < 50 then send on “medpack channel”, else send on “shieldcan channel”).
    • Place Item Granters for the med pack and shield can, wired to their respective channels.

3. Wire Connections

  • Wire the trigger’s “When Triggered” output to your Blocks device.
  • Inside Blocks, the broadcast signals from the “If” blocks should activate the corresponding Item Granters. if this dont my brain power cant help yah
2 Likes

Can anyone simplifly these?

Try this guide

Also mark a solution if you have one

1 Like

Simplification? The random chance guide IS pretty simple
Freedom’s blob is detailed enough for you to do it
You can also use pixel’s guide, but remember to activate it by prop destroyed instead of zone

1 Like

I thought there was a tutorial on this but I cant find it.

i simplify as mush as i could sorry if it did not hurt im not righting long stuff for some time my hands hurt

2 Likes

I get it bro, I get it.

I’ll try and get pics after school ok.

I’m also using randomized gadgit rarity

im done im done right ing my hands are bleeding :sob:

How did you even type that much… i am impressed
Anyways @Superkid66 is this problem solved yet or you need some more help

Ok, I think I can work something out, thank you, ALL of you!

your welcome if you need help formers are there to help :smiling_face_with_sunglasses:

:+1: Thank you all again!

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.