Topic category: Help with Minecraft modding (Java Edition)
So I'm trying to create a mod based off of the Naruto series, and the first feature I'm trying to implement is one that randomly assigns the player to one of four clans. I thought I had the procedure set up correctly, however there seems to be an issue. So the procedure is set to trigger upon the player joining the world. After that it checks to see whether or not the player has already been assigned to a clan. If not, it generates a random number, between 1 and 4, assigns each clan to a value, and then assigns the player to a clan with a corresponding message, notifying the player which clanthey have been assigned to. However when I test this out, I do not see any message in-game upon creating and joining a world. Amy help here would be greatly appreciated. I can post the procedure set up too, I'm just not sure the right way to do that.
I think the logic you're describing is sound, but make sure the returned value for your randomized clan is being stored to a PLAYER_PERSISTANT string variable that has a distinct initial value that wouldn't be polled on accident/create false positives (i.e., not having the initial value be blank or a space char or something).
I believe I've done that. Could be wrong though, here's what the procedure actually looks like. https://imgur.com/a/125GoYB
Hi akrayniak, when using the "Random number between min and max" block, it is able to choose a random number that is a decimal. On top of that, your 1 to 4 means the highest number it can generate is 3.999999. To fix all of this, you need a "Round down" block in front of your min and max, and you'll also need a multiplication block where the number on the right of it is your max number.