-- Init function called from K3dEngine during initialization -- Warning -- Don't delete this function -- Function must exist function Init() print("Loading map ./maps/test/camera_map.lua") K3d_LoadMap("./maps/test/camera_map.lua") InitScene() end -- Update function called from K3dEngine during update scene -- Warning -- Don't delete this function -- Function must exist function Update() UpdateScene() if K3d_CheckKeyboardKey("Esc") then -- Load new script and delete this script -- This function must be called as last function in this script -- else engine shut down in next funcion -- because next function doesn`t exist in new script K3d_LoadNewScript("./scripts/main_menu_script.lua") end end -- Delete function called from K3dEngine during delete scene -- Warning -- Don't delete this function -- Function must exist function Delete() print("Delete() function called") end -- Global variables g_iVertexId = -1 -- Init scene in scene initialization function InitScene() -- Your some scene initialization print("InitScene() function called") local x,y,z,r,g,b,size x=10 y=20 z=30 r=0 g=255 b=0 size=5 g_iVertexId = K3d_AddVertex(x,y,z,r,g,b,size) if g_iVertexId == -1 then print("Vertex doesn`t exists.") return false end K3d_Hide(g_iVertexId, ObjType.iVertexObj, false); end -- Update scene in avery frame function UpdateScene() -- Your some scene updates K3d_Print("K3dEngine 0.1") K3d_Print("K3d_AddVertex, K3d_Hide scripts example") end