im trying to make a game and a method that spawns an actor is a random number is equal to one. only problem is i dont know how to spawn the actor plz halp
current code-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | { public void act() { Whentospawn(); setLocation(getX(), getY() - 4 ); } public void Whentospawn() { if (Greenfoot.getRandomNumber( 100 ) == 1 ) { } } } |