diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-27 00:58:36 +0100 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-27 00:58:36 +0100 |
commit | 087713746ba1b8cac4ce5142fa136d3bde56cca6 (patch) | |
tree | 1c5e1a4e60362325fd85ae660505f36ce602fa34 /mario/init.lua | |
parent | 551b77b9dc7da84299c39f333314eaa36e699981 (diff) |
Added turtle movement
Diffstat (limited to 'mario/init.lua')
-rw-r--r-- | mario/init.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mario/init.lua b/mario/init.lua index 51b1b64..c435bf7 100644 --- a/mario/init.lua +++ b/mario/init.lua @@ -1,8 +1,11 @@ +mario = {} dofile(minetest.get_modpath("mario").."/pipes.lua") dofile(minetest.get_modpath("mario").."/blocks.lua") dofile(minetest.get_modpath("mario").."/portal.lua") dofile(minetest.get_modpath("mario").."/turtle.lua") +dofile(minetest.get_modpath("mario").."/gamestate.lua") + minetest.register_node("mario:placer",{ description = "Reset", @@ -23,8 +26,14 @@ minetest.register_node("mario:placer",{ player:setpos({x=pos.x+16,y=pos.y+0.1,z=pos.z+1}) print(name) player:set_physics_override(1,1,0.3,true,false) - minetest.add_entity({x=pos.x+3,y=pos.y+12,z=pos.z+1}, "mario:1") - minetest.add_entity({x=pos.x+30,y=pos.y+12,z=pos.z+1}, "mario:1") + + -- Left Turtle + minetest.add_entity({x=pos.x+3,y=pos.y+12,z=pos.z+1}, "mario:turtle1") + -- Right Turtle + local turtler = minetest.add_entity({x=pos.x+30,y=pos.y+12,z=pos.z+1}, "mario:turtle1"):get_luaentity() + turtler.direction = {x=-1,y=0,z=0} + + minetest.sound_play("mario-game-start", {pos = pos,max_hear_distance = 40,gain = 10.0,}) end, }) minetest.register_node("mario:placer2",{ |