Guest User

Untitled

a guest
Jan 5th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //when objenemybasic collides with objsword
  2.  
  3. if(!hit)
  4. hit=true; sound_play(HitSnd) sound_stop(SwdSnd);
  5. pushback = 50
  6. x += lengthdir_x(pushback,point_direction(x,y,other.x,
  7. other.y)+180);
  8. y += lengthdir_y(pushback,point_direction(x,y,other.x,
  9. other.y)+180);
  10.  
  11. //when objenemybasic collides with objwall
  12.  
  13. if(place_meeting(objectEnemyBasic.x+1,objectEnemyBasic.y+1,objWall))x += lengthdir_x(pushback,point_direction(x,y,other.x,
  14. other.y)+90);
  15. if(place_meeting(objectEnemyBasic.x+1,objectEnemyBasic.y+1,objWall))y += lengthdir_y(pushback,point_direction(x,y,other.x,
  16. other.y)+90);
  17.  
  18. //in the events area, the objwall collision is above the objsword collision if that makes any difference. doesn't appear to be movable.
Add Comment
Please, Sign In to add comment