Docs / Custom Scripts

Custom Scripts allow you to create reusable procedures in your game that can be called from any of your scripts.

Your Custom Scripts will be listed in the Scripts section of the Navigator while on the Game World View.

Click the + button to create a new Custom Script or select one to edit from the list.

Once you've given your Custom Script a name you can start building a script in the same way you would for Actors, Triggers and Scenes.

Parameters

Whenever you add an event that reads a Variable it will get added to the list of input parameters for the Custom Script, where you are able to give that input a memorable name. Events that affect Actors will, by default, apply to the player but if you use the actor selector you will be able to set the event to read the Actor value from an input parameter also.

For example the following custom script makes Actor A rotate in a circle.

Calling a Custom Script

Once you have created a Custom Script you can call it from any other script by adding a Call Script event which will appear as follows.

You first must choose the script which you wish to call, if that script has any variable or actor parameters you can then choose which inputs to use.

If you ever want to edit the Custom Script you can return to it using the list on the Navigator or by selecting Edit Custom Script from the event dropdown menu.

Next: Assets