Script conflict => need help!

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Cpt. Jack Sparrow
Posts: 245
Joined: Fri, 10. Jun 05, 16:56
x3

Script conflict => need help!

Post by Cpt. Jack Sparrow »

I'm working on a mod in which the player can conquer sectors. To acomplish that i wrote a setup script that checks for enemies in these secotrs and gives them to the player if no enemys are present. The script itself works fine but it seems to cause problems with the X2 artificial life scripts. as long as my script is running, the al-plugins dont and the al menu options are gone too :o as soon as i remove my script and reload the game, the al plugins work fine.

but i really dont se the problem. even worse, a previous version of my script didn't cause any problems (unfortunately i rewrote the whole thing since then, so i can't go back there) :shock:

I uploaded the script here: http://rapidshare.com/files/234022686/s ... nquest.xml

Can please somebody who has more understanding of scripts and how they work look at it and tell where the problem is? Thanks...
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

You should split your script. A wait of 120000ms in a setup script? I think, this may be the reason why the AL menu options are gone, but I'm not sure. But these may only show if the setup scripts all stopped running.

Rename the script to something like "plugin.sectorconquest". Your "setup.sectorconquest" should call plugin.sectorconquest like this:

Code: Select all

@ START = $NULL -> call script 'plugin.sectorconquest' : 
--------------------------------

[ external image ]
Cpt. Jack Sparrow
Posts: 245
Joined: Fri, 10. Jun 05, 16:56
x3

Post by Cpt. Jack Sparrow »

That worked! Thank you! :)

In early versions i had a much shorter wait and only checked one sector. Back then, there was no Problem with the al-plugins. so i guess your theorie is correct.

but now i can leave the wait at 120000ms anyway. there is no need for this script to run more frequently...

Return to “X²: The Threat - Scripts and Modding”