Guest User

Player outside room code

a guest
Jun 22nd, 2011
1,850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. if y-8 > room_height
  2. {
  3. if room_exists(obj_location.south)
  4. {
  5. room_goto(obj_location.south)
  6. y = 0+8
  7. }
  8. }
  9. if y-8 < 0
  10. {
  11. if room_exists(obj_location.north)
  12. {
  13. room_goto(obj_location.north)
  14. y = room_height-8
  15. }
  16. }
  17. if x+8 > room_width
  18. {
  19. if room_exists(obj_location.east)
  20. {
  21. room_goto(obj_location.east)
  22. x = 0+8
  23. }
  24. }
  25. if x-8 < 0
  26. {
  27. if room_exists(obj_location.west)
  28. {
  29. room_goto(obj_location.west)
  30. x = room_width-8
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment