[ create a new paste ] login | about

Link: http://codepad.org/ElnMjf5y    [ raw code | fork ]

Lua, pasted on Apr 25:
print("DooM mod started")

minetest.register_on_joinplayer(function(player)
	print("DooM mod: Player (" .. player:get_player_name() .. ") joined.")

	minetest.after(1, function()
		minetest.sound_play("doom_d1e1m1", {
			object = player,
			gain = 1.0,
			max_hear_distance = 5.0,
			loop = true,
		})
		local id = player:hud_add({
			hud_elem_type = "image",
			position = {x=0.5, y=1},
			name = "doom",
			scale = {x=1, y=1},
			text = "doom_hud.png",
			number = 0,
			item = 0,
			direction = 0,
			alignment = {x=0, y=-1},
			offset = {x=0, y=0},
		})
		print("DooM mod: Player (" .. player:get_player_name() .. ") joined. Registered HUD item with id " .. id)
	end)
end)


Create a new paste based on this one


Comments: