Dice that can be anywhere

I attempted to make this on my own but it didn’t work. I want to make dice that you can roll anywhere with a game overlay. It will have a popup chain that can let you pick what sided die you want to roll. The sides are 4-20. I can’t figure it out. For some context I am making a Dungeons and Gims map.
Edit: if it is possible could it not use 20% memory or just a lot

I suggest you just use a 20-sided dice, and then…

Place down a property called “roll”, and make it 0 and numerical by default.

Button pressed (Game Overlay) → Trigger (Trigger)

The trigger goes:

Set property [roll]
Value (random integer) from [1] to [20].

And then everything else.

However, if you dont want to do that, use this guide to make a popup shop, and then when each call-to-action button to choose the dice is clicked, set a property called “sides#” to that corresponding value using counters and repeaters. Then, do the thing with the trigger again but instead…

Set property [roll]
Value (random integer) from [1] to (get property) [sides#]

And then do everything else.

2 Likes

You would need to use a blocks for each dice, which generates a number between 1 and the max number, and then have it display a popup that shows the number, probably global scope so people can’t cheat

AKA What @mysz said

It took me a minute to process but how would I show the player what they got and reset the sides#

Broadcast the message onto a trigger, and the trigger runs the wire pulse block for a popup that says “You got [sides#] as your roll!”

The trigger then triggers another trigger with delay of 0.1 seconds that sets “sides#” equal to 0.

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