Wing Commander CIC

Hi all:

For your scripters, please note the following. The ship ids must be unique for the lifetime of the mission. It is not correct to do this

code=math.random(0,65536);
id="$" .. code;

and then use id as a ship id. It is also wrong to use the same id when creating multiple ships.

The correct thing to do is somewhere at initialization time do

code = 0;


then when you want to create your ship
id = id="$" .. code;

then go create a new ship, and after ship creation do

code = code + 1
Back
Top