K
kilnakorr
Guest
Hi
I'm new to GM (did some looong time ago and forgotten most of it), and the new layout isn't helping.
I'm trying to start out with something simple, but stuck since most guides doesn't really match what I'm trying to do:
Basically I want to destroy an instance when it reaches a certain y position, so it doesn't continue out of the bottom of the screen.
What's the easiest way to do this?
I found this little bit of easy code:
var inst = instance_position(x, 300, obj_vmgbomb);
if inst {
with inst instance_destroy(obj_vmgbomb);
}
Either it's not correct of I'm not running the script right.
Any ideas?
I'm new to GM (did some looong time ago and forgotten most of it), and the new layout isn't helping.
I'm trying to start out with something simple, but stuck since most guides doesn't really match what I'm trying to do:
Basically I want to destroy an instance when it reaches a certain y position, so it doesn't continue out of the bottom of the screen.
What's the easiest way to do this?
I found this little bit of easy code:
var inst = instance_position(x, 300, obj_vmgbomb);
if inst {
with inst instance_destroy(obj_vmgbomb);
}
Either it's not correct of I'm not running the script right.
Any ideas?