So will changing ... to .. speed up things?
Not how you've written it.
The "->call script" command start the script directly on the objects task 0
*, which is the main task. Doing this on the [PLAYERSHIP] will switch your ship into autopilot until the called script has finished.
The only difference between "<RetValue> = [THIS] -> call script..." and "START [THIS] -> call script" is, that the last command doesn't wait for a returnvalue but directly continues executing the calling script.
If the calling script and the called script both run on task 0 of the same object (which might be the case in your example, if [THIS] == [PLAYERSHIP]) using the START option will most likely cause a problem, since you are overwriting the calling script with the called script, but at the same time, START makes the SE execute the calling script directly.
So, as a solution, I'd simply run the script globally with START or start a seperate task on the [PLAYERSHIP].
*More precisely the "->call script..." commands will start the called script on the same task that the command was given in.
So, when you're running a script on task 20 of an object and use a "->call script..." command in this script, the called script will also run on task 20.
--------------------------------------------------------
Just to make sure that my questions are not left unanswered:
ScRaT_GER wrote:I have a short question concerning the RegEx Engine used by X3:TC.
I want to match roman digits I, V and X. So only if a string consists of these digits, I want a match.
The regular expression which should fullfill this need should be the following one: ^(I|V|X)+$
According to an online RegEx checker this works.
However it does not work with X3:TC.
I'm reading the RegEx from a T-File, where it is defined like this:
Reading this text from the T-File and logging it to the logbook shows, that everything is unescaped correctly.
But unfortunately it just won't match any romand digits. So XVII is not a match for
^(I|V|X)+$ - at least not in X3:TC.
Is it a mistake on my side - and if so, how can I make it work - or is the X3:TC RegEx Engine not capable of processing this RegEx?
ScRaT_GER wrote:When using the "call named script" command, I noticed that in the ingame SE the option "START" is not available.
However, in the Exscriptor it is possible to use that startoption and it works perfectly well, as long as you START the script on an object.
If you START it globally, it will call the script in an infinite loop which can crash your game:
Code: Select all
* works perfectly well:
START [PLAYERSHIP]->call named script: script='a.test', null, null, null, null, null
* crashes your game:
$null = null
START $null->call named script: script='a.test', null, null, null, null, null
So was the START option forgotten or left out on purpose? If the latter applies, why was it left out?
Greetings,
ScRaT