[WIP] <RefObj> factory production task: on=<Var/Number>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Post Reply
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24961
Joined: Sun, 2. Apr 06, 16:38
x4

[WIP] <RefObj> factory production task: on=<Var/Number>

Post by X2-Illuminatus » Fri, 1. Apr 11, 16:17

<RefObj> factory production task: on=<Var/Number>


<RefObj> = A factory you want to turn its production task on or off.
<Var/Number> = A TRUE or FALSE value or its representing number 1 or 0.


This will turn the production task of the as <RefObj> selected factory on, if <Var/Number> is TRUE and off if <Var/Number> is FALSE.
This is important to know, if you create stations using the create station-command rather than building it with a TL class ship. When you create a station its production task is turned off. In case a station is already producing and its production task will be turned off, it will first finish its current production cycle. If the production task is turned off, the factory won't produce even if it has enough ressources.


Example:

$sector = [PLAYERSHIP] -> get sector
$factory.arr = $sector -> get factory array from sector
$size = size of array $factory.arr
while $size
|dec $size =
|$factory = $factory.arr[$size]
|$factory -> factory production task: on=[FALSE]
end
return null

This will turn every factories' production task in the current player sector off.


Related Commands:

[color=lime]<RefObj>[/color] [color=sta ... r>[/color]


Command Location: __________________
TODO: Add missing links to named commands.

Post Reply

Return to “MSCI Reference”