How to calculate individual chance over a total 10% of 60 iterations?

284 Views Asked by At

I'm developing a game that needs to calculate a 10% chance over a second of shooting against the player. The problem is, this calc is run every frame at a 60 frame rate.

So I need the individual percentage of each frame, that could reach the 10% after 60 frames.

I tried => 1/10/60 = 0.166% on each frame, but this doesn't work well.

How to do it?

1

There are 1 best solutions below

1
On BEST ANSWER

You want it on average to shoot every sixth frame, so that's a $1/6$th probability per frame ($16.6\%$), not $0.166\%$.