JohnSEBEKS

GunPickup

Feb 4th, 2020
258
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Create Event:
  2.  
  3. execute code:
  4.  
  5. image_index = choose(0, 1, 2);
  6. image_speed = 0;
  7. image_angle = random(360);
  8. // Spin direction
  9. dir = choose(-1, 1);
  10.  
  11. Step Event:
  12.  
  13. execute code:
  14.  
  15. // Rotate when thrown
  16. image_angle += (3 * speed) * dir;
  17.  
  18. // Friction
  19. speed = Approach(speed, 0, 0.25);
  20.  
  21. Collision Event with object enemypar:
  22.  
  23. execute code:
  24.  
  25. // Bounce off wall and increase friction
  26. move_bounce_solid(true);
  27. speed *= 0.5;
  28.  
  29. // Switch rotate direction
  30. dir *= -1;
  31.  
  32. Collision Event with object obj_wallCol:
  33.  
  34. execute code:
  35.  
  36. // Bounce off wall and increase friction
  37. move_bounce_solid(true);
  38. speed *= 0.5;
  39.  
  40. // Switch rotate direction
  41. dir *= -1;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×