]> git.r.bdr.sh - rbdr/pico-engine/blame_incremental - scripts/npc_jumper.lua
Add The requirements (basic stuff)
[rbdr/pico-engine] / scripts / npc_jumper.lua
... / ...
CommitLineData
1--Configuration for the Jumper
2this.actorname = "Enemy: Jumper"
3this.enemy = enemy_evil
4this.controllable = false
5this.jumpstrength = 6
6this.physics = true
7
8print(">>> Entity Created - "..this.actorname);
9
10function this.jump(this)
11 if (this:get_vertical_speed() == 0 and math.random(150) == 50) then
12 this:set_vertical_speed(this:get_vertical_speed()-this.jumpstrength)
13 end
14end
15
16function this.act(this)
17 this:jump()
18end
19
20--END