Issue using script to create a station

Home Board Index » X3AP » Scripts and Modding » Issue using script to create a station

dford1991

dford1991 avatar
Level badge Rookiguey (4)
Posted 10 years ago.

So I'm trying to spawn a few Incendiary Bomb Launcher forges in the Unknown Sector east of Legend's Home. I'm trying to use a script to spawn in the forges (since they cannot be found in game *easily*). I have successfully been able to spawn the station, using the General Object Commands > Create Objects > Create Station, also including the Trade Commands > For Stations > add default wares to station/dock. However, when I run the script, the station spawns, but does not run. It shows the IBL as its final product, and Ore, energy cells, and Nostrop Oil (?) as its required resources, but they seem to be just holding space, as the station will never enter a production cycle, even with the necessary resources. I am a rookie scripter, so any advice/help would be appreciated!

Roguey

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

hmm.. after creating the station in the script, tell it to start job;

$station = create station ... blah blah
$station->start job


This usally gets the HQ working, so probably work for a normal station too.

dford1991

dford1991 avatar
Level badge Rookiguey (4)
Posted 10 years ago.

Yup, I forgot about that command. I had actually forgotten to set it to $station->start job: TRUE. Thanks for the point in the right direction!

1


You need to log-in to post here.