Page 1 of 1

unique index id

Posted: Fri Jul 13, 2012 8:04 am
by enric
In the editor, when placing units, each has a unique index (by side), the first unit is 0, the next 1, etc.
Is this a primary key safe, e.i, will BA keep always that id during play. When scripting can be referred a unit by this id?

Re: unique index id

Posted: Fri Jul 13, 2012 2:36 pm
by pipfromslitherine
You can use this in the scripting, but bear in mind that adding and removing units can then alter these values.

Cheers

Pip

Re: unique index id

Posted: Fri Jul 13, 2012 3:53 pm
by enric
pipfromslitherine wrote:You can use this in the scripting, but bear in mind that adding and removing units can then alter these values.

Cheers

Pip
You're referring in the editor, no?, once the game starts, when a unit is eliminated , the unique value doesn't change, right?

Re: unique index id

Posted: Fri Jul 13, 2012 5:02 pm
by pipfromslitherine
Correct - currently units never really 'die' - they just get removed from the board.

Cheers

Pip