V
VansiusProductions
Guest
Hi guys,
This is my script and code for destroying specific instances using instance_place but it's not working, the instances are still there.
The code that is calling the script
The first instance_destroy() is for the calling object, the object that is not working is the one right below: obj_element where i call the script:
Is there anything I'm doing wrong? Any help is appreciated
This is my script and code for destroying specific instances using instance_place but it's not working, the instances are still there.
The code that is calling the script
Code:
if (x >= 352 && y = 62 && global.groupDeselect = 1) {
instance_destroy()
with (obj_element) {scr_hideElements()}
global.groupSelectedA = 0
global.groupIsDeselect = 1
}
if (x >= 352 && y = 222 && global.groupDeselect = 1) {
instance_destroy()
with (obj_element) {scr_hideElements()}
global.groupSelectedB = 0
global.groupIsDeselect = 2
}
Code:
//obj_group_air
if (global.groupIsDeselect = 1 && global.groupSelectedA = 1) {
destroy = instance_place(512,62,obj_air)
with (destroy) instance_destroy()
}
if (global.groupIsDeselect = 2 && global.groupSelectedB = 1) {
destroy = instance_place(512,222,obj_air)
with (destroy) instance_destroy()
}
//obj_group_earth
if (global.groupIsDeselect = 1 && global.groupSelectedA = 2) {
destroy = instance_place(512,62,obj_earth)
with (destroy) instance_destroy()
}
if (global.groupIsDeselect = 2 && global.groupSelectedB = 2) {
destroy = instance_place(512,222,obj_earth)
with (destroy) instance_destroy()
}