The scripting documentation is currently somewhat incomplete, unfortunately, but you can see an introductory example for GUI and map scripting at Creating Teleporter Stations.
More GUI scripting examples, including very comprehensive ones, are found in directory Games/DeathMatch/GUIs/, and GUI scripting documentation is at The Cafu GuiSys.
More map scripting examples are found in directory Games/DeathMatch/Worlds/. Map scripting is where our documentation is (currently) lacking the most...
The short answer is: The Cafu engine calls it automatically.pizzadude223 wrote:how do I call my lines of code after I have written them? Like if I hit in an object and it needs to do something, how do I call the code that makes it do stuff to make it do the action?
For example, when a trigger entity is named "trapdoor", and a player enters the trigger area, the engine automatically calls script method
Code: Select all
You can see an example of this in file TechDemo.lua and others mentioned above.
But you're right, the related documentation is scarce, I'll do my best and try to find the time to make some enhancements during the upcoming week!
Users browsing this forum: No registered users and 2 guests