Advertisement
Guest User

Pseudo mode logic A-Engine code

a guest
Feb 22nd, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.85 KB | None | 0 0
  1. #A 300 seconds timed battle A-Engine pseudo code
  2. {mode_id=0}
  3. [init]
  4. #this is where variables are initiated and calls are done in the beginning of the match  
  5. set_reg = $t$, 60 * FPS   #time limit ($t$) is 60 seconds in this mode.
  6. [/init]
  7.  
  8. [win_conditions]
  9. #if your HP is more than 0, and your team is the only one standing OR if time is up and you have highest HP
  10. (@team_hp@ > 0 && @teams_count@ == 1) || ($t$ == 0 && @team_hp@ == @highest_team_hp@)
  11. [/win_conditions]
  12.  
  13. [lose_conditions]
  14. #if team with lowest HP has 0, they've lost OR if time is up, and your HP is not the highest
  15. @team_hp@ == 0 || ($t$ == 0 && @team_hp@ != @highest_team_hp@)
  16. [/lose_conditions]
  17.  
  18. [draw_conditions]
  19. #if time is up and both teams have same HP
  20. $t$ == 0 && @highest_team_hp@ == @lowest_team_hp@
  21. [/draw_conditions]
  22.  
  23. [main_loop]
  24. set_reg= $t$, $t$-1  #every frame subtract time by one (count down)
  25. [/main_loop]
  26. {/mode}
  27.  
  28. #A squiddish match mode A-Engine pseudo code.
  29. {mode_id=1}
  30.  
  31.  
  32. default_bp= 0  #set all BP (bonus points; goals in this case, to 0).
  33.  
  34. [init]
  35. #this is where variables are initiated and calls are done in the beginning of the match  
  36.  
  37. #opoint the ball in the middle of the stage. Since its the first object, it has onscreen_id: 0
  38. call_object[id=0 frame=0 x= y= z=]
  39. set_reg= $t$, 300 * FPS   #time limit for the match is 5 minutes (300 secs)
  40. [/init]
  41.  
  42. [win_conditions]
  43. #if time is up AND your goals are the highest
  44. $t$ == 0 && @team_bp@ == @highest_team_bp@
  45. [/win_conditions]
  46.  
  47. [lose_conditions]
  48. #if time is up AND your goals are not the highest
  49. $t$ == 0 && @team_bp@ != @highest_team_bp@
  50. [/lose_conditions]
  51.  
  52. [draw_conditions]
  53. #if time is up and both teams have same goals
  54. $t$ == 0 && @lowest_team_bp@ == @highest_team_bp@
  55. [/draw_conditions]
  56.  
  57. [main_loop]
  58. set_reg= $t$, $t$-1  #every frame subtract time by one (count down)
  59. [/main_loop]
  60. {/mode_id}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement