You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? I want to create an “AI” (It’s not really an AI, but u get the idea) for AI Aircrafts to do what the Controller tells them. Kind of like in this game but this one is hardcoded (not versatile as I would like it): Air Traffic Control Simulator - Roblox
a better example of what I want to recreate is the game “I am an Air Traffic Controller 4” on steam.
-
What is the issue? I have no idea how I have to go about getting to my desired outcome. I want the script to be versatile, So lets say I change the layout of the airport, it will still work.
-
What solutions have you tried so far?
I have this basic airport done, the parts you see floating in the air are spawnpoints for the aircraft and, the little blocks near the runway are waypoints, I thought about moving them through the waypoints to whereever they have to go but I don’t know if this is the best option considering there is pathfindingservice and all that stuff out there.
This is the code I have written till now:
Atc Module Script:
local aircraftlib = game:GetService("ServerStorage").AircraftLibrary
local atc = {}
function atc.planeSpawn (planeType, spawnPos)
local pickedType = aircraftlib:FindFirstChild(planeType)
if pickedType then
local spawnPlane = pickedType:Clone()
spawnPlane.Parent = workspace
spawnPlane:PivotTo(spawnPos.CFrame)
else
warn("Requested plane type not found!")
end
end
function atc.planeMove (reqPlane, destPos)
end
return atc
Script in ServerScriptService:
local atc = require(script.Parent.AtcModule)
local spawnPos1 = workspace.spawnPos.parkPos1
atc.planeSpawn("Cessna", spawnPos1)