Hello, Forumers!
I’m trying to make a DnD stat selection system, and I need help detecting the lowest number of 4 and setting that to 0. Please help!
I’m trying to make a DnD stat selection system, and I need help detecting the lowest number of 4 and setting that to 0. Please help!
Uhhhh…
What?
Set what?
I have 4 variables being set to random numbers from 1 to 6
I need the lowest variable to be set to 0
because the dnd stat roll is 4d6 - the lowest roll
wait is this Devices?
@NagiSeishiro alr
No, don’t worry about putting this in Devices , that’s usually for theories or tests from what I’ve seen.
This is from the top of my head:
Compare the variables in a string of if/else if statements, using the <> symbols.
I have no stamina to be doing code right now, sorry.
bomp.
i still need help cuz i don’t wanna have to do a ton of block code figuringout myself
trigger with a trigger delay of whatever triggering a checker that checks the property value, if it’s 4. if it’s 4, then it triggers a trigger with a block and sets the property value to 0.
ez and use a counter to change the property to 4 over time
-__- kor did you read the OP
@Kormorant I asked for detecting the lowest value of 4 random variables in a block
for stats and then i calculate modifiers based off of that
then idk I guess I misread
Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Should be easy
Make the variables properties using the set property block and do this block code (I took a pic from my AI Tic Tac Toe map so change the properties to make sense for you)
i just need to detect which of 4 numbers is the lowest ![]()
lol
But to make it easier copy the first trigger that you made and just put in the right properties.
oh, thats simple (I was scared away by the complicated block code)
Just get 2 triggers, make the first trigger compare the first and second property (I think your stats are properties), then the highest of the two will set a fifth property to that amount. Then in the second trigger (It has to specifically run after the first trigger, so add a small delay) it compares properties 3 and 4, then in the same trigger it compares the higher of the two with property 5.
You COULD set a property on how many 1s were rolled. If a one is rolled, and that property is 0, then eliminate that die.
Repeat this for higher dies if you want to.
i’m using variables because otherwise im gonna hit the property limit because of the turn-based system