Using a random variable in C++
LoveFromSkyy

I'm working on the first level of my game and I want to know how I can make the monster use a random attack on the player AND use the correct number of damage. Here is the data that I wrote for this part (I'm not including the whole code because the rest is useless):

Tell me if you need more of the code to answer this. Please help me with this.

You are viewing a single comment. View All
Answered by 19wintersp [earned 5 cycles]
View Answer
Baconman321

@19wintersp Doesn't the random integer have to be seeded?
I ran into a problem seeding an integer inside a loop due to it most of the time being seeded with time (which doesn't change fast enough for loops).