Author Topic: Eventing Help  (Read 1212 times)

       Hello! Today I was attempting to make sort of a Call of Duty Zombies knock-off into Blockland, but I ran into an issue. I can't figure out how to make a Mystery Box. How exactly do you make a brick where once activated, it picks a random weapon and spawns it? As always, any and all help is appreciated.

This can be done using projectile randomizers. To start, you should build the box and have the main button which you activate to get the random weapon. Somewhere outside your map or out of view, place a 1xwhatever distance plate, it depends on how many outcomes you want (1x16=32 different outcomes). Name this plate something like Projspawner. Now, at the same distance above and below that plate (there needs to be a space between the Projspawn and the weapon outcomes)place 1x1s the length above and below the Projspawn.

It'd look something like this:

---------------- <Top layer of 1x1s
(Space) <(Don't make the space too big, 1-3 flat bricks is fine).
---------------- <The 1xwhatever (Projspawn)
(Space same distance as the one above)
---------------- <Bottom layer of 1x1s

Now, event all the 1x1s to be OnProjectilehit > Namedbrick (where you want weapons to appear) > SpawnItem > Item.
Event the main activator button to be OnActivate > Namedbrick (Projspawn) > Spawnprojectile > Gunbullet (I like to change the size of the bullet to the smallest value, don't make it too big or it might hit multiple outcome [1x1] bricks).

Try it out to see if it works. If this was too confusing I can give you pictures or give you the save to a mystery box I've already made. You can also add a weapon cycle sequence like in COD where the box cycles through multiple weapons before giving the player their weapon. Let me know if you'd like help on that, it can also be done. Good luck with this.

-snip-
do you mind sending one or two screenshots? Besides that thank you so much I think this will work greatly!



Here's the box. Nothing really special about it, The center brick is the activator brick that triggers the projectile randomizer, and later spawns the weapon.



Here's the actual randomizer. Everything there should be explained on the screenshot. I forgot to mention the side, black bricks, but I think I explained it well enough in the pic.

Basically, the black bricks never are hit and don't matter. You can put anything there, but it won't be hit. For safety though, incase something glitches up and those bricks are hit, I put a Onprojectilehit >Namedbrick (projspawn) > Spawnprojectile > Gunbullet. This just causes the whole randomization thing to be reset, it's just a failsafe if a glitch happens. Hope this helped, if you need any more info or better explanation, just ask.

Instead of the projectile randomization, try pickRandNamedBrick and Event_RandomItems.

Have the box pick a random brick out of several named bricks, and each brick will set a random out of 4 items you have set.