Hello Everybody,
I would like to create a mode that works a little bit like the autopilot from the X Games. My plan would be to use it to auto dock the player to a given station. So you dont need to fly on your own :)
I tried to somehow get all points together about where and what but to be honest im kind of lost.
For my first test I added a new script under scripts\commands that should work like this /flyto x y z
According to the documentation in the gamefolder I dont see a way to do this, Im quite sure I somehow missed a point.
What I have so far is this:
package.path = package.path .. ";data/scripts/lib/?.lua"
function execute(sender, commandName, ...)
local args = {...}
--empty array for cords
local cords = {}
for i, v in pairs(args) do
print(i)
print("--")
print(v)
Server():broadcastChatMessage("TEST", 0, v)
cords[i] = v --add cord to array
end
local p = Player()
Server():broadcastChatMessage("TEST", 0, Player().Name)
return 0, "", ""
end
function getDescription()
return "Fly to given x y z cordinate and stops"
end
function getHelp()
return "Fly to given x y z cordinate and stops Usage: /flyto x y z"
end
Please dont laugh, I cant find a way to activate the debug console... How do I do this?
Why do i see the first output in the chat but not the player name?