Greetings, and How would I do this?

I am very new to the teck industry but have a few game ideas I think maybe be possible with GDevelop. I am currently creating a dice rolling rpg with a greater than or less than stat system.

What I want to know is if it is possible to assign animations to different values that can be checked and create an output. Could an avid user please guide me or help with this inquiry so I may continue to get me feet soaked into the soups of this programming endeavor and make silly things like this easy?

If I understood your problem, you need to store your random value first (inside a variable), so you can use it inside the animation event and in other events too.

Thank you, but now that i’m using a global variable my dice are all rolling the same outcome. Way to divide outcomes or individualize?

use the “for each objec” event. and the wiki.

Took my time. Now the events look like this. It’s fine but is their an expression to stop the repeating at one?

Another question how would you make roll calculations? And how would you add and subtract the number of dice used for a roll and what kind of dice used? I could probably fill a bucket with questions really.

You should rather think a little, and you would realize the answers.

to stop repeating add “trigger once” condition.*
if your dices are separate objects, then you don’t need the “for each” object event.
when you want a random number between 0 and X, you don’t have to use RandomInRandg(), the simplest Random() is enough. because this always start at zero, thus need only specify the X. it’s not a mistake, I’m just saying.
to make the calculations you have to use an expression.

*Note to devs, admins and other high-ranking persons:
is the Wiki really miss the “trigger once” condition? or its topic is hidden? i can’t believe this has to be said to each newcomer individually! there is certainly a reason, why they are not found it! completely missing? or just not listed in enough places? or it is in wrong places? or something else? there must be something!

I think the two most recurring answers are “use a for each” and “use a trigger once” :blush:
I guess we should try to include them somewhere on that page: Basic game making concepts: What you need to know to start with GDevelop [GDevelop wiki]

2 Likes