Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- actor thingy replaces healthbonus
- {
- var int user_xAdd;
- var int user_yAdd;
- var int user_Pos;
- States
- {
- Spawn:
- BON1 A 0 NoDelay
- {
- A_SetUserVar ("user_xAdd",x);
- A_SetUserVar ("user_yAdd",y);
- if (user_xAdd < 0)
- {
- A_SetUserVar ("user_xAdd",-user_xAdd); // Makes x positive.
- }
- if (user_yAdd < 0)
- {
- A_SetUserVar ("user_yAdd",-user_yAdd); // Makes y positive.
- }
- A_SetUserVar ("user_Pos",((user_xAdd+1024) * (user_yAdd+1024) / 997));
- }
- // Use modulus (%) to divide, and use the remainder to decide outcome.
- BON1 A 0 A_Jumpif (user_Pos % 4 == 0, "Zero")
- BON1 A 0 A_Jumpif (user_Pos % 4 == 1, "One")
- BON1 A 0 A_Jumpif (user_Pos % 4 == 2, "Two")
- BON1 A 0 A_Jumpif (user_Pos % 4 == 3, "Three")
- fallback:
- ROCK ABCDCB 6
- stop
- Zero:
- BON1 ABCDCB 6
- Loop
- One:
- BON2 ABCDCB 6
- Loop
- Two:
- SHEL A 6
- Loop
- Three:
- STIM A 6
- Loop
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement