Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local paralX = API.load("paralX")
- local particles = API.load("particles")
- -- Enemy absorbing
- EnemVar = 0
- -- Load the bgs
- local pic1i = Graphics.loadImage ("pic1.png")
- local pic2i = Graphics.loadImage ("pic2.png")
- local pic3i = Graphics.loadImage ("pic3.png")
- local pic4i = Graphics.loadImage ("pic4.png")
- local pic5i = Graphics.loadImage ("pic5.png")
- -- Load images
- local hud1 = Graphics.loadImage ("hud1.png")
- local hud2 = Graphics.loadImage ("hud2.png")
- local hud3 = Graphics.loadImage ("hud3.png")
- local hud4 = Graphics.loadImage ("hud4.png")
- function onStart ()
- Graphics.activateHud(false)
- Defines.jumpheight_bounce = 0.7;
- -- Player Stuff
- player.powerup = 2
- player.character = 1
- pic1 = paralX.create ({image=pic1i, priority=-0.5, repeatX=true, repeatY=false, parallaxX=1, parallaxY=1, sections={1}})
- pic2 = paralX.create ({image=pic2i, priority=-0.5, repeatX=true, repeatY=false, parallaxX=1, parallaxY=1, sections={2}})
- pic3 = paralX.create ({image=pic3i, priority=-0.5, repeatX=true, repeatY=false, parallaxX=1, parallaxY=1, sections={3}})
- pic4 = paralX.create ({image=pic4i, priority=-0.5, repeatX=true, repeatY=false, parallaxX=1, parallaxY=1, sections={4}})
- pic5 = paralX.create ({image=pic5i, priority=-0.5, repeatX=true, repeatY=false, parallaxX=1, parallaxY=1, sections={5}})
- end
- function onNPCKill(_, killedNPC, _)
- if killedNPC.id == 25 then
- Audio.playSFX("ninjl.wav");
- Defines.earthquake = 5;
- Defines.jumpheight_bounce = 30;
- EnemVar = 1
- end
- if killedNPC.id == 126 then
- Audio.playSFX("sound2.wav");
- Defines.earthquake = 3;
- Defines.jumpheight_bounce = 0.7;
- EnemVar = 2
- end
- if killedNPC.id == 29 then
- Audio.playSFX("ninjl.wav");
- Defines.earthquake = 10;
- Defines.jumpheight_bounce = 20;
- player.powerup = 6
- EnemVar = 3
- end
- end
- function onTick ()
- Graphics.draw{type = RTYPE_IMAGE, x = 0, y = 0, priority=4, image=hud1}
- -- Enemy Absorb. Hud
- if EnemVar == 1 then
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 4, priority=5, text = "Purple Ninji Power"}
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 20, priority=5, text = "Super Bounce Ability"}
- Graphics.draw{type = RTYPE_IMAGE, x = 0, y = 0, priority=5, image=hud2}
- end
- if EnemVar == 2 then
- Graphics.draw{type = RTYPE_IMAGE, x = 0, y = 0, priority=5, image=hud3}
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 4, priority=5, text = "Green Ninji Power"}
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 20, priority=5, text = "Low Bounce Ability"}
- end
- if EnemVar == 3 then
- Graphics.draw{type = RTYPE_IMAGE, x = 0, y = 0, priority=5, image=hud4}
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 4, priority=5, text = "Hammer Bro Power"}
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 20, priority=5, text = "Throw Hammers Ability"}
- end
- if EnemVar == 0 then
- Graphics.draw{type = RTYPE_TEXT, x = 68, y = 4, priority=5, text = "No Power!"}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement