C
Carpe Zythum
Guest
Is there a way to test collision before creating an instance?
( I want to spawn my weed object only if there isn't one there )
This code doesn't work though:
EDIT: This code is being called in the obj_spawn object.
( I want to spawn my weed object only if there isn't one there )
This code doesn't work though:
Code:
/// Spawn grass
if(global.game_time_status = TIMEOFDAY.DAY) {
alarm[1] = spawn_grass_time;
var xx = random_range(32, room_width - 32);
if(place_empty(xx,480)) {
instance_create(xx,480,obj_weed); // Create the new grass on the ground at the random position
}
}
Last edited by a moderator: