Author Topic: Event_RandomItems - Simple random item spawning and setting  (Read 2779 times)

This is an extremely simple mod I made on commission to someone. It's been about 11 months since it was commissioned, which I figure should be long enough for them to have capitalized off the uniqueness. I have a number of mods like this I'll be releasing soon. Tomorrow will be something more substantial.

This mod adds the output event "setRandomItem" for the brick class. It has four item outputs, which allows you to choose up to four items that are then selected from randomly. This is simpler than other random item events because it requires no setup outside the event system, but obviously has the limitation of 4 items maximum. (For those wondering, the event system has a cap of 4 output selections)

There are also "spawnRandomItem" variants for bricks, players, and bots. For players this is effectively addItem since the player will instantly pick up the item if they have inventory space.

There are no commands or prefs for this mod.

« Last Edit: April 24, 2018, 02:54:53 AM by Pecon »

Looks good! Does its job plain and simple.

I needed this pretty badly awhile ago.
I did manage to find an over-complicated solution (projectiles used to randomly hit different bricks), but it'll be great to not have to rely on that in the future.
Thanks for posting!

I needed this pretty badly awhile ago.
I did manage to find an over-complicated solution (projectiles used to randomly hit different bricks), but it'll be great to not have to rely on that in the future.
Thanks for posting!
Use VCE aaaaaaa


Yeah I sure did capitalize on this. Thanks Pecon