Here are some demos to help you get started with scripting.
Unzip them to check out the code, or import them as a Don't call remove Entity the same frame you reduced the entity's damage to 0.
If you try to open a world with scripts on a device that doesn't support scripts, you will see an error message letting you know you can't enter the world.
This signs up our script to be set-up either on the client or server threads of the game.
Generally speaking, you will choose based on whether you put the script file in the client or server folders.
Please check this section if your scripts aren't working as expected. In order to check for the script engine starting and connect it to the UI you will need the following: engine.on("facet:updated:core.scripting", ...); Followed by the following line after you are done doing your initialization: engine.trigger("facet:request", ["core.scripting"]); Event Data is now standardized.
Call create Event Data to create an event data object prefilled with all the fields and default values for an event.