-
Notifications
You must be signed in to change notification settings - Fork 2
Lua examples.
TheHellBox edited this page Nov 6, 2018
·
5 revisions
ent = World.CreateGameObject()
ent:with_model("cube")
ent:with_position(0, 0, 0)
ent = ent:build()
x = 0
AddEvent("Update", "move_object", function()
x = x + 0.000001
ent:SetPosition(x, 0, 0)
end)
AddEvent("OnClientConnected", "preload_models", function(id)
player = Player.GetByID(id)
script = "World.LoadModel('./assets/models/cube/cube.obj', 'cube')"
player:SendLua(script)
end)