Writeing a Script

Home Board Index » X3: Terran Conflict » Writeing a Script

caffeeine

caffeeine avatar
Level badge Proguey (12)
Posted 11 years ago.

Ok so i know how to make rogueys Make.Sats loop scripts and i have changed it around to allow me to put cargo ships in every sector. But my question is how would i write it so they only appeared in a Argon or Boron sectors?

A question that has puzzled me for my whole 24 years of life. If a word is in the dictonary is mispelled how do we know?
Roguey

Roguey avatar
Level badge Trueguey (22)
Posted 11 years ago.

To check the owner of a sector you will need an if statement in-front of the command -> get owner race. So something like:

$sector_owner = $sector -> get owner race
if ($sector_owner = 'Argon' )


Its not exact, but should give you an idea. throw the if into bunch of nested for loops (x and y), then use get sector from x=, y= and you should be able to check each sector. You should also add a check to see if sector exists too. im guessing you have some programming experience.

caffeeine

caffeeine avatar
Level badge Proguey (12)
Posted 11 years ago.

To check the owner of a sector you will need an if statement in-front of the command -> get owner race. So something like:$sector_owner = $sector -> get owner raceif ($sector_owner = 'Argon' )Its not exact, but should give you an idea. throw the if into bunch of nested for loops (x and y), then use get sector from x=, y= and you should be able to check each sector. You should also add a check to see if sector exists too. im guessing you have some programming experience.
- Roguey


yes and no i know what you are trying to say and that is a big help i was close but off a bit thanks

A question that has puzzled me for my whole 24 years of life. If a word is in the dictonary is mispelled how do we know?
1


You need to log-in to post here.