Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(i = 0; i < sprite_width; i++)
- {
- for(j = 0; j < sprite_height; j++)
- {
- hitboxtouch = instance_position(x, y, obj_hitbox)
- hurttouch = instance_position(x, y, obj_hurtbox)
- if hitboxtouch != noone and hitboxtouch.maker != self and hurttouch != noone and hurttouch.maker = self
- {
- hitboxcheck = true;
- xx = i;
- yy = j;
- }
- hitboxed = hitboxxed
- if hitboxcheck = true
- {
- for(k = 0; k < 20; k++)
- {
- for(l = 0; l < 20; l++)
- {
- hitbox = instance_position(xx, yy, obj_hitbox)
- if hitbox = noone
- {break;}
- if hitbox.checked = true or hitbox.maker = self
- {
- x = hitbox.tempx;
- y = hitbox.tempy;
- hitbox.x = global.tempx;
- hitbox.y = global.tempy;
- hitbox = noone
- }
- else
- {
- for(m = 0; m < 20; m++)
- {
- hitboxreturn = instance_position(global.tempx, global.tempy, obj_hitbox)
- if hitboxreturn = noone
- {break;}
- else
- {
- hitboxreturn.x = hitboxreturn.tempx;
- hitboxreturn.y = hitboxreturn.tempy
- }
- }
- break;
- }
- }
- if hitbox != noone
- {
- if k = 0
- {hitbox = hitboxed;}
- if hitbox.priority > hitboxed.priority and k != 0
- {hitbox = hitboxed;}
- hitbox.checked = true;
- }
- else
- {
- break;
- }
- }
- }
- if hitboxed.priority > hitboxxed.priority
- {
- hitboxxed = hitboxed
- }
- hitboxxed = hitboxed;
- hitboxcheck = false;
- for(n = 0; n < 20; n++)
- {
- for(o = 0; o < 20; o++)
- {
- hitbox = instance_position(xx, yy, obj_hitbox)
- if hitbox = noone
- {break;}
- if hitbox.checked = false or hitbox.maker = self
- {
- x = hitbox.tempx;
- y = hitbox.tempy;
- hitbox.x = global.tempx;
- hitbox.y = global.tempy;
- hitbox = noone
- }
- else
- {
- for(p = 0; p < 20; p++)
- {
- hitboxreturn = instance_position(global.tempx, global.tempy, obj_hitbox)
- if hitboxreturn = noone
- {break;}
- else
- {
- hitboxreturn.x = hitboxreturn.tempx;
- hitboxreturn.y = hitboxreturn.tempy
- }
- }
- break;
- }
- }
- if hitbox != noone
- {
- if k = 0
- {hitbox = hitboxed;}
- if hitbox.priority > hitboxed.priority and k != 0
- {hitbox = hitboxed;}
- hitbox.checked = false;
- }
- else
- {
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement