Hey guys,
I'm currently tackling the scriptable controller ticket. As you may or may not be aware, currently there are only two commands available and adding new ones is a rather cryptic and difficult task. My aims thus are:
- Add more standard commands
- Improve the syntax to add costum commands
- Improve the management of the timing parameters
So far:
- Added new command: ral ("rotate and look", no more unnecessary loops)
- Parameters are no more restricted to vector coordinates only
#392 Scriptable Controller
Moderator: PPS-Leaders
Re: #392 Scriptable Controller
I didn't use the scriptable controller so far, but I wonder if it is currently possible to define loops? E.g. a spaceship that does the same actions over and over? Or are the actions only executed once and then the script stops?
If this is not possible yet, I think this could be an interesting task to implement.
If this is not possible yet, I think this could be an interesting task to implement.
Fabian 'x3n' Landau, Orxonox developer
Re: #392 Scriptable Controller
As the controller script is written in Lua you have all the control goodies already at your disposal (if-else, loops, e.t.c.), there is no need for a dedicated C++ implementation.
Re: #392 Scriptable Controller
Really? Because I thought the Script-Events are put into a list in ScriptController. So what happens if the controller script (in Lua) contains an endless loop?
Fabian 'x3n' Landau, Orxonox developer
Re: #392 Scriptable Controller
The issue you are describing is related to timing: The user is supposed to keep track of the event timing specifications within the lua code himself (unfortunately my attempts at automating this in the C++ code were not rewarding at all...). Thus, as long as you update the time correctly within your code any loop or conditional structure works just fine. If you happen to run to events simultaneously by mistake, things will go wrong.
Who is online
Users browsing this forum: No registered users and 4 guests