This site requires JavaScript, please enable it in your browser!
Greenfoot back
Ostarius
Ostarius wrote ...

2017/4/21

Random SHooting

Ostarius Ostarius

2017/4/21

#
Is there a way to make actors shoot bullets randomly in random directions?
danpost danpost

2017/4/21

#
'Greenfoot.getRandomNumber(1000) < n', where n is some low number that can be altered to suit, would be sufficient as a condition to occasionally shoot. 'Greenfoot.getRandomNumber(360)' would be a random rotational value to set to the bullet.
Ostarius Ostarius

2017/4/22

#
Thank you
You need to login to post a reply.