Monster spawning

For questions about using Classic.

Post » Fri Apr 01, 2011 7:34 pm

Guys I need help with monster spawning in my 2d shooter. How can I spawn monsters randomly? Any examples? Waiting for your replies. please..... :cry:
B
11
S
3
G
6
Posts: 193
Reputation: 4,234

Post » Sat Apr 02, 2011 9:53 am

What do you mean by "Spawn monsters randomly"? Do you mean spawn them at random time intervals or spawn them in random locations on the map?

For random time intervals and random location you could go:
+ System: Every Random(1000)+1000 milliseconds
-> System: Create object BadGuy on layer 1 at (Random(LayoutWidth), Random(LayoutHeight))

That would spawn an enemy once every 1-2 seconds at a completely random spot on your layout.
B
7
S
2
G
4
Posts: 164
Reputation: 2,418

Post » Sat Apr 02, 2011 10:13 am

Thanks! That's what I need.
B
11
S
3
G
6
Posts: 193
Reputation: 4,234


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests