Hi! I’m making a big game. Just my enemy has gotten in the way. ERRORS . And I have one that I can’t find. Luckily, I have my fellow forum members to help me out a bit. Could you guys find the errors and maybe fix them? Here is my game: Kicky and Friends. More characters and levels and customizations WILL be added. I will keep you updated on the game.
1 Like
Your main error is that sometimes the big block of “12.5% chance” if statements in your On A Button Pressed block can easily go through without ever hitting any of the 12.5% chance places, so textSprite is never created and the game errors when you use it!
To fix this, you can make a variable, for this example I’ll call it “Random”. If you set Random to a random number from 0 to 5, the number will only ever be 0, 1, 2, 3, 4, or 5. Because it has to be one of those numbers, we can pick a random thing to happen for each one, like this:
This also makes sure that each option has the same chance of happening!
I would recommend doing this for every place you used the “% chance” blocks because there is always a small chance that none of them get picked.
Also, keep in mind that there are 6 options there because 0 is also an option.
2 Likes
Ur the best
1 Like
BTW i have 12 more character slots. The only thing is, ur character has to be a verb with a “y” at the end ((verb)+(y)) and has to follow the lines of this: