Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. hasDoubleJump_Player1 = true
  2. hasDoubleJump_Player2 = true
  3.  function onLoad()
  4.   hasDoubleJump_Player1 = true
  5.   hasDoubleJump_Player2 = true
  6.  end
  7.  function onKeyDown(keycode)
  8.   if(player.keycode == KEY_JUMP and player:mem(0x60, FIELD_WORD) == -1 and hasDoubleJump_Player1 and player:mem(0x108, FIELD_WORD) == 3)then
  9.     player.speedY = -10            
  10.     hasDoubleJump_Player1 = false --If you have a yoshi,allow him to Double Jump!
  11.  end
  12.  if(player2.keycode == KEY_JUMP and player2:mem(0x60, FIELD_WORD) == -1 and hasDoubleJump_Player2 and player2:mem(0x108, FIELD_WORD) == 3)then
  13.     player2.speedY = -10            
  14.     hasDoubleJump_Player2 = false --If you have a yoshi,allow him to Double Jump!
  15.  end
  16.   if(player.keycode == KEY_JUMP and player:mem(0x60, FIELD_WORD) == -1 and hasDoubleJump_Player1 and player:mem(0x112, FIELD_WORD) == 4)then
  17.     player.speedY = -8              
  18.     hasDoubleJump_Player1 = false -- If you wear the Tanooki suit (or Racoon idk) allows us to double jump
  19.  end
  20.  if(player2.keycode == KEY_JUMP and player2:mem(0x60, FIELD_WORD) == -1 and hasDoubleJump_Player2 and player2:mem(0x112, FIELD_WORD) == 4)then
  21.     player2.speedY = -8              
  22.     hasDoubleJump_Player2 = false -- If you wear the Tanooki suit (or Racoon idk) allows us to double jump
  23.  end
  24.  end
  25.  function onJumpEnd()
  26.     hasDoubleJump_Player1 = true
  27.     hasDoubleJump_Player2 = true
  28.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement