Load the mission file tutorial.mis
With the main character, run over to the sign that reads "Hello world!"
Open the world editor (F11), then the AI Node Inspector (F5) and select the objective marker object named "Tutorial01Objective".
Open the file game/modkit/tutorial/Tutorial01Objective.cs with your code editor.
We use the term objective to mean an object in the world that runs a set of functions in script.
The cs file combined with the objective marker object in the world make an objective. This objective prints "Hello world!" to the console and gui when the main character gets within 5 meters of the object. Note that all of the functions have the argument %aMarker, which is the object in the world.
Most of the functions in this file are empty, but we define them anyway because they all get called by the ai manager. If there is an objective marker object in the world the ai manager will expect the functions with the same name to be defined. The scope object in the comments refers to the main character or the camera if it is not attached to the main character.
Bookmarks