Well first bit you want to do is use Start_Script()
It takes in the path to the script then a single argument afterwards. Many use an array to pass multiple pieces of information, or a struct, or a dictionary.
First check the script you're going to start and make sure it can receive say an array and put its indices into the variables it needs to.
Once you determine how it will receive the information, you need to determine the path for Start_Script()
If it is in a package you want to do :packagename: before the file name, and add any sub directories below it.
Example.... :sing:soothingsong
You dont need the .ecl on the end.
If say the shard is in a deprecated file structure and everything is inside of scripts/misc/ you would do Start_Script("::misc/filename", arguments);
The "::" refers to the root area
Next goes back to what the started script wants to receive.
In a typical use script, two arguments get passed - a mobile reference for the one using the item, and the item.
Program UseScript(user, item)
When you do Start_Script() and pass that data, everything will be inside of user and item will be empty.
So ways to handle this:
Code: Select all
Start_Script(":sing:soothingsong", array{user, item});
--------
Program UseScript(user, item)
item := user[2];
user := user[1];
endprogram
Code: Select all
var arguments := struct;
struct.+user := user;
struct.+item := item;
Start_Script(":sing:soothingsong", arguments);
--------
Program UseScript(user, item)
item := user.item;
user := user.user;
endprogram