Hello all!
I am looking to use an external script to house variable data and options related to a traffic system, all connected via RemoteFunction(GetTrafficVariables
):
So, I’m happy now, but I want to go further by using GetTrafficVariables
to fill in some information for the Controller. The information is:
ModesOfOperation = { "PreTimed", "Actuated" }
TypeOfOperation = { ["PreTimed"] = "Isolated", "Coordinated",
["Actuated"] = "Semi-Actuated", "Fully-Actuated", "Coordinated" }
The blanks that the Controller needs filled are:
script.GetTrafficVariables.OnInvoke = function(ModesOfOperation, TypeOfOperation)
ModeOfOperation = ""
TypeOfOperation = ""
end
This is where user input will occur. The user will select from an interface the Mode and Type based on their needs – behind the scenes, the Controller will get their selected options (which are the indexes and values within the TypeOfOperation & ModeOfOperation
tables). I need it only to retrieve one of each (i.e. ModeOfOperation = "Actuated" TypeOfOperation = "Semi-Actuated"
) ← This example is the intended fruits of my labor. All indexes and values I plan to have defined as I get to each one and research its function.
Here is the source I am drawing from, use it to wrap your heads around what is going on here (if needed).
Thanks in advance!