hello. I have the fallowing code attached to my curser object. but when I drag the box over just one object both objects are always selected. I just want any and all object inside the drag box to be selected. Do you know how I could go about doing this? Any help would be appreciated thank you.
//in create event
drawing = false
selectionParent=Curser
//in left mouse pressed event
drawing = true
startX = mouse_x
startY = mouse_y
//in left mouse released event
drawing = false
endX = mouse_x
endY = mouse_y
with (selectionParent) {
collision_rectangle( other.startX,other.startY,other.endX,other.endY,EInf,false,true)
global.MAASolected=true
}
with (selectionParent) {
collision_rectangle( other.startX,other.startY,other.endX,other.endY,EKing,false,true)
global.EKSolected=true
}
//in draw event
if (drawing){
draw_rectangle(startX,startY,mouse_y,mouse_y,true)
}
//in step event
x=mouse_x
y=mouse_y
//in create event
drawing = false
selectionParent=Curser
//in left mouse pressed event
drawing = true
startX = mouse_x
startY = mouse_y
//in left mouse released event
drawing = false
endX = mouse_x
endY = mouse_y
with (selectionParent) {
collision_rectangle( other.startX,other.startY,other.endX,other.endY,EInf,false,true)
global.MAASolected=true
}
with (selectionParent) {
collision_rectangle( other.startX,other.startY,other.endX,other.endY,EKing,false,true)
global.EKSolected=true
}
//in draw event
if (drawing){
draw_rectangle(startX,startY,mouse_y,mouse_y,true)
}
//in step event
x=mouse_x
y=mouse_y