Guest User

Untitled

a guest
Aug 10th, 2016
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. actor thingy replaces healthbonus
  2. {
  3. var int user_xAdd;
  4. var int user_yAdd;
  5. var int user_Pos;
  6. States
  7. {
  8. Spawn:
  9. BON1 A 0 NoDelay
  10. {
  11. A_SetUserVar ("user_xAdd",x);
  12. A_SetUserVar ("user_yAdd",y);
  13.  
  14. if (user_xAdd < 0)
  15. {
  16. A_SetUserVar ("user_xAdd",-user_xAdd); // Makes x positive.
  17. }
  18.  
  19. if (user_yAdd < 0)
  20. {
  21. A_SetUserVar ("user_yAdd",-user_yAdd); // Makes y positive.
  22. }
  23.  
  24. A_SetUserVar ("user_Pos",((user_xAdd+1024) * (user_yAdd+1024) / 997));
  25. }
  26. // Use modulus (%) to divide, and use the remainder to decide outcome.
  27. BON1 A 0 A_Jumpif (user_Pos % 4 == 0, "Zero")
  28. BON1 A 0 A_Jumpif (user_Pos % 4 == 1, "One")
  29. BON1 A 0 A_Jumpif (user_Pos % 4 == 2, "Two")
  30. BON1 A 0 A_Jumpif (user_Pos % 4 == 3, "Three")
  31. fallback:
  32. ROCK ABCDCB 6
  33. stop
  34. Zero:
  35. BON1 ABCDCB 6
  36. Loop
  37. One:
  38. BON2 ABCDCB 6
  39. Loop
  40. Two:
  41. SHEL A 6
  42. Loop
  43. Three:
  44. STIM A 6
  45. Loop
  46. }
  47. }
RAW Paste Data