Random level backgrounds/enemy spawners

6 views
Skip to first unread message

vent...@gmail.com

unread,
Apr 21, 2015, 3:39:27 PM4/21/15
to greenfoot-dis...@googlegroups.com
Romain Lettuce

How do you make levels change background through the different levels? Like Berzerk from 1980, where the next level after the first looks different every time. Also, how do you make spawners that create enemies every 5 seconds in random places?



Kosta Rica confirmed.


###################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
#####################################
###############################

Wen Bei

unread,
Apr 21, 2015, 3:44:11 PM4/21/15
to greenfoot-dis...@googlegroups.com
Try making a timer and run the spawn method when the timer is divisible by 5. Random places just use greenfoot's random number method
Reply all
Reply to author
Forward
0 new messages