You can import the ready-made example from here: Hello, World Example
Well, a screenshot is a must here, sorry.
Log.Info("Hello, world!");
Congratulations, this was officially the first step towards mighty scripts of the future.
To make it a bit more interesting, let's set up our script to run only when a specific key, for example, F1
, is pressed.
Click/Hold
mode and specifying F1
Click/Hold
is used to deactivate the trigger immediately after pressing. So, by pressing F1
twice, we will execute our script twice. The Toggle
mode would toggle the trigger on and off with each press. Since our action is in the OnEnter block, pressing twice would execute our script only once.
Now, every time you press F1
, your script will print in the Event Log
. Of course, this might not be the most exciting thing we can do, but more on that in the following examples.