Step_0.gml 709 B

12345678910111213141516171819202122232425262728293031323334353637
  1. if !revive
  2. {
  3. x = obj_player.x + 10;
  4. y = obj_player.y + 10;
  5. depth = obj_player.depth + 1;
  6. image_angle = obj_player.image_angle;
  7. }
  8. else if (--timer)
  9. {
  10. global.pts = 0;
  11. if keyboard_check(ord("W"))
  12. y -= 7;
  13. if keyboard_check(ord("S"))
  14. y += 7;
  15. if keyboard_check(ord("A"))
  16. x -= 7;
  17. if keyboard_check(ord("D"))
  18. x += 7;
  19. image_angle = point_direction(x, y, mouse_x, mouse_y);
  20. if !(timer % 12)
  21. {
  22. var inst = instance_create_layer(x, y, "Instances", obj_trace_p);
  23. inst.image_angle = image_angle;
  24. }
  25. }
  26. else
  27. {
  28. revive = false;
  29. timer = 300;
  30. instance_create_layer(x, y, "Instances", obj_player);
  31. }
  32. if keyboard_check(vk_escape)
  33. {
  34. global.rooom = "title";
  35. instance_create_depth(0, 0, -100, obj_fade);
  36. }