When you create a world in ElvenShade, there are 3 types of scripts you can write:
Server scripts run on the server for each user. Your sensitive game logic should go here to avoid cheating/hacking. The APIs used by this type of script are geared toward controlling the state of the game world, such as damaging another users’s health or acquiring a new item.
Client scripts run on the client for each user. The APIs used by this type of script are geared toward controlling the user interface and making requests to server scripts.
Mod scripts are also client scripts, however they exist only for the specific user. The APIs used by this type of script are the same as the client script APIs. These scripts are ideal for using admin APIs. If provided with an interface to do so, end-users can create client side mods.
Script executions (either when the script is started or when a queued function call is made) will timeout if they run for more than 1000ms. For a smooth experience, it is recommended to keep script executions under 100ms. Remember users on slower devices will take longer to execute them. Execution duration is automatically logged to the console. There is also a recursion limit of 500 within an execution.
The name of the current script.
The time at the beginning of this frame (Read Only). This is the time in seconds since the start of the application.
Listen for a console log with specified callback and optionally supply a list of arguments. Log message will be added to the end of the argument list. onLog callbacks are not added to the script execution queue but are executed in parallel. They do not log the duration of execution (thus avoiding an infiite loop). You should also not use es.console.log(message) within an onLog callback for the same reasons.