+ 3
I am not sure if i got your question. But one way to include probability of spwaning enemy would be to do something like this if(Math.random()<0.3) spwan (); // here enemy is spwaned at a probability of 30% if(Math.random()<0.75) spwan(); // here its 75% probability of spwaning an enemy
12th Sep 2022, 1:58 AM
Prashanth Kumar
Prashanth Kumar - avatar