Changes between Version 16 and Version 17 of Hooks


Ignore:
Timestamp:
Mar 17, 2016, 6:34:41 PM (9 years ago)
Author:
Christian Illy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hooks

    v16 v17  
    11Hooks are a way to add additional behaviour to the scripts. They are basically custom scripts that are called upon specific events. For example one could define a hook which is called on player connects and then send a message in the in-game chat to greet the new player.
    22
    3 All hooks have to executable files in ''SDTD_BASE/hooks/<name of hook>/<any name>.sh''. The folder ''<name of hook>'' has to be in exactly the same case as the hook name column in the table below shows it.
     3All hooks have to executable files that are either placed in ''SDTD_BASE/hooks/<name of hook>/<any name>.sh'' for global hooks that apply to all instances or ''SDTD_BASE/instances/<name of instance>/hooks/<name of hook>/<any name>.sh'' for hooks that only apply to that specific instance. The folder ''<name of hook>'' has to be in exactly the same case as the hook name column in the table below shows it.
    44
    55If you want to use the functions of the management scripts in your hook you can add this to the start of your script: