From 10a0e290ac07524dc129cc2b227b0f9e95df0f8e Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 16 Apr 2012 09:39:52 -0500 Subject: first commit --- scripts/npc_jumper.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/npc_jumper.lua (limited to 'scripts/npc_jumper.lua') diff --git a/scripts/npc_jumper.lua b/scripts/npc_jumper.lua new file mode 100644 index 0000000..f58d1ff --- /dev/null +++ b/scripts/npc_jumper.lua @@ -0,0 +1,20 @@ +--Configuration for the Jumper +this.actorname = "Enemy: Jumper" +this.enemy = enemy_evil +this.controllable = false +this.jumpstrength = 6 +this.physics = true + +print(">>> Entity Created - "..this.actorname); + +function this.jump(this) + if (this:get_vertical_speed() == 0 and math.random(150) == 50) then + this:set_vertical_speed(this:get_vertical_speed()-this.jumpstrength) + end +end + +function this.act(this) + this:jump() +end + +--END \ No newline at end of file -- cgit