How to insert codes?
-
- Posts:7
- Joined:2010-05-12, 04:01
I have done alot of lua programming on other engines, just not this one, and I dont know where and how to insert my lines of code to make actions on here. Can someone help me?
Re: How to insert codes?
What exactly do you want to achieve?
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 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...
Best regards,
Carsten
Carsten
-
- Posts:7
- Joined:2010-05-12, 04:01
Re: How to insert codes?
Okay, I understand how to program it, like 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?
Re: How to insert codes?
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
trapdoor:OnTrigger()
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!
Best regards,
Carsten
Carsten
Who is online
Users browsing this forum: No registered users and 9 guests