GameMaker: Studio

GameMaker: Studio

Find, play, and make games easily
Discover, rate, and download the best player-created games made in GameMaker: Studio for free. Or try making your own and share with the community. Click here to learn more.
Code Question
Edit: 2/2/2034 4:34 CST

Have already found the answers to my original questions in the tutorials, but now have a new one.

Half of the room is the in view playing field, and the other half of the room is where the waves of enemies are suppose to spawn, however using the spawn at random location seems to be spawning the enemies outside the room, and greatly messing up the path finding.

is there a tutorial on how o properly spawn waves of enemies in a designated zone of the current room?
Last edited by AlyssaThalon; 2 Feb, 2024 @ 2:39pm
< >
Showing 1-1 of 1 comments
The Winter Bud 4 11 May, 2024 @ 10:36am 
//create event zone_x=100; // left side of zone zone_y=100; // top side of zone zone_w=500; // width of zone zone_h=500; // height of zone
// mob spawn event var random_x=irandom_range(zone_x, zone_x+zone_w); var random_y=irandom_range(zone_y, zone_y+zone_h); var mob=instance_create(random_x, random_y,obj_enemy);
The above code will create an instance of obj_enemy in a random location supplied by the zone.
Last edited by The Winter Bud; 13 May, 2024 @ 11:29am
< >
Showing 1-1 of 1 comments
Per page: 1530 50