Script Exports
The RemoteStartMission function is an export function that allows you to start a mission remotely from another resource or client. It provides an interface to start a specific mission and handle the corresponding responses and actions.
Important: Setting the game variables WILL REPLACE the ones set within the mission file.
Parameters:
missionId
: The unique identifier of the mission you want to start.gameVariables
: (nil for optional) An object that contains the game variables needed for the mission.playerInitiator
: The playerServerId of the player who initiated the quest start request.
Example
When use custom game variables?
Let's imagine that you want to create a shoplifting system, because each store is different, so you could configure the name, if it is for liquors or chocolates. Then you will make a list of temporary game variables that depending on the player's location will call one another.
Another example is, you want to make a variable mission where an objective is not always in the same place, so you make a table of variables and when you start the mission to play, it automatically selects the alternatives.
Example
Why require playerInitiator?
The playerInitiator is required to prevent malicious players from initiating missions for other players while away. (It's a small filter, although we are working on alternatives)
Last updated
Was this helpful?