Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // Knight coin
  2. void onInit( CBlob@ this )
  3. {
  4. this.getCurrentScript().tickFrequency = 4;
  5. }
  6.  
  7. void onTick( CBlob@ this )
  8. {
  9. CPlayer@ player = this.getPlayer();
  10. if ((player is null) || (!this.hasTag("bombed"))) return;
  11.  
  12. Vec2f velocity = this.getOldVelocity();
  13. f32 speed = Maths::Abs(velocity.Length());
  14.  
  15. if (-velocity.y < 3.0f)
  16. {
  17. this.Untag("bombed");
  18. print("untaggedbombed");
  19. return;
  20. }
  21.  
  22. if (getNet().isServer())
  23. {
  24. player.server_setCoins(player.getCoins() + 1);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement