Advertisement
ROMaster2

Auto-Split Psudeo Code for Shovel Knight

Dec 4th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var StillAlive = false; //To know when the boss is killed by the player
  2. var TempGold = 0; //Temporary hold to watch when it increases
  3. if (BossHealth > 0) StillAlive = true; //Boss is found
  4. if (BossHealth === undefined) StillAlive = false; //Player is slain, reset the condition.
  5. if (BossHealth = 0 && StillAlive = true) //Boss is slain
  6.     {
  7.     StillAlive = false; //Reset for next boss
  8.     TempGold = PlayerGold; //Watching when it increases
  9.     }
  10. if (PlayerGold > TempGold) split(); //It increased, split
  11.  
  12.  
  13. //If the value for BossHealth is null or undefined when not fighting said boss, just watch for when the value is 0.
  14. var TempGold = 0;
  15. if (BossHealth = 0) TempGold = PlayerGold;
  16. if (PlayerGold > TempGold)
  17.     {
  18.     split();
  19.     TempGold = 0;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement