I've just made some contributions to the modding wikia, for example these scripting-related general instructions:
Do you understand any of this? Quote from myself:
Note that when creating a new script for a certain object/bot, you need to at least:
(1) select from "Activation Type" (up center) when the script will be triggered (eg. upon starting the map/when the bot dies/randomly/at a timed interval),
(2) Choose under "Actions" the script(s) you wish to use from the list of scripts. (You often need to specify a certain target via "SelectCompanionAsTarget" or another targeting script, to make sure that the actual active script you wish to use refers to the correct object/bot.) You can have a long list of scripts here, and time their occurance by adding waiting time in between (possible to add time right after the name of script).
(3) You may often wish to set certain conditions for your script, unless you wish to create a script which is not limited by any conditions.
Some useful, important scripts (which may not be self-explainatory):
SetGlobalFlag: Use this script is you want something which happens on MAP A to influence another spesific thing which happens on MAP B. (An example: If John-the-bot dies, SetGlobalFlag "JohnIsDead" =1. Open another map, where John's daughter Jill lives. Jill can have a Script for exclaiming her intense sorrow, with a condition set as GlobalFlagIs "JohnIsDead" =1.)
SetVariable: Can be used like SetGlobalFlag (above), but within one single map - NOT across maps. (Tip: You can also use it as "AddToVariable" so that a certain condition will only come true when the Variable has a bigger value, like 5. This may be needed for example if the player needs to gain the trust of five different villagers, before (s)he is able to convince the gatekeeper that (s)he is indeed trustworthy.)
Edited 5 years ago