diff options
Diffstat (limited to 'build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua')
| -rw-r--r-- | build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua b/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua new file mode 100644 index 0000000..91409c4 --- /dev/null +++ b/build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua @@ -0,0 +1,19 @@ +--Configuration for the Jumper +this.actorname = "Enemy: Jumper" +this.enemy = 1 +this.controllable = 0 +this.jumpstrength = 6 + +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 |