diff options
| author | Ben Beltran <ben@nsovocal.com> | 2012-04-16 09:39:52 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2012-04-16 09:39:52 -0500 |
| commit | 10a0e290ac07524dc129cc2b227b0f9e95df0f8e (patch) | |
| tree | ed518c45c45d96e37e28640f745496fffb8e1325 /build/Debug/Pico-Lua-Test.app/Contents/Resources/npc_jumper.lua | |
first commit
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 |