Skip to content

Instantly share code, notes, and snippets.

@clupasq
Created May 19, 2017 13:07
Show Gist options
  • Save clupasq/fb8810463ba4ed1fcc4d1ba0881bd88b to your computer and use it in GitHub Desktop.
Save clupasq/fb8810463ba4ed1fcc4d1ba0881bd88b to your computer and use it in GitHub Desktop.
Super crazy Blobby Volley rules - before each serve, the game switches to a random mode between Jumping Jack, Sticky or Default
__AUTHOR__ = "wolf & radu"
__TITLE__ = "Super Crazy"
-- Based on two other game modes by chameleon: Jumping Jack and Sticky Mode
mode = "default"
function randomize()
x = math.random(1,3)
if x == 1 then mode = "default"
elseif x == 2 then mode = "jumping"
else mode = "sticky"
end
end
function OnGame()
if not isgamerunning() then
randomize()
end
end
function HandleInput(player, left, right, up)
if mode == "jumping" then
if isgamerunning() then
return left, right, true
else
return left, right, up
end
elseif mode == "sticky" then
if isgamerunning() then
return left, right, false
else
return left, right, up
end
else
return left, right, up
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment