aboutsummaryrefslogtreecommitdiff
path: root/scripts/npc_jumper.lua
blob: f58d1ff1ee287b65db07a084866769c0c026a8ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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