Help with factories

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

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

Davros
Posts: 7
Joined: Tue, 10. Feb 04, 10:45
x3

Help with factories

Post by Davros »

Does anyone know how to get a list (array) of resources that are used by a factory. I might have missed something obvious, but the script only seems to provide functions to get the number of resources (primary and secondary) used by a factory.
XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk »

most scripts use a workaround:
- create a script, that returns an array containing all available wares (manually add 'em to an array)
- use a loop that tests for each element in this array, whether it's used by the station or not, if used, add it to another array
then you've got the used wares :)

let's hope there will be a function to get the ressources in 1.4
Davros
Posts: 7
Joined: Tue, 10. Feb 04, 10:45
x3

Post by Davros »

Thanks

Looks like a long night of typing for me then.
XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk »

ask someone if you may use his script for doing that :)
Davros
Posts: 7
Joined: Tue, 10. Feb 04, 10:45
x3

Post by Davros »

Looks like someone has already written the script I need over here.

http://www.x2source.com/mods/pafiledb.p ... gory&id=17

Thanks for your help :)

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