The object should move to contact with groupHurtSolid. I tried some sort of for-loop to sweep until it collides, but this code gives veeeeerryyyy buggy and weird results. move_contact_solid would work perfectly, but I can't use solid objects for enemies cause it would screw up all other collisions. move_contact_all is not suitable either.
(Project is Megalonia for Action 52 owns in case someone wants to know)startXOffset = 0
width = 8
scanAccuracy = 2
originalX = x
if(global.shipdirection = RIGHT){
image_xscale = 1
}
else{
image_xscale = -1
}
if(global.shipdirection = RIGHT){
ship = o_ship.id
for(ix = 0 ;ix + x < 600 + originalX;ix+=scanAccuracy){
if(collision_ellipse(bbox_left+ix,bbox_top,bbox_right+ix,bbox_right,groupHurtSolid,true,true)){
x += ix
break
}
}
}
else{ //If it was like this it would work
move_contact_solid(180,1000)
ship = o_shipleft.id
}
y = ship.y + ship.cannonLocY
I've probably done some stupid mistake somewhere... maybe.
[Edit] Of course the best scenario is if there is a general script like move_contact(dir,max,
object)