Page 1 of 1
Scripting question...
Posted: Tue Mar 20, 2007 2:10 pm
by Charlie
Is it possible to change an object's scanClass from within an AI script?
Something like:
scanClass = "CLASS_THARGOID"
or
scanClass = ("CLASS_THARGOID");
or
("scanClass: CLASS_THARGOID")
???
Not that I have any mean plans up my sleeve...
Posted: Tue Mar 20, 2007 2:14 pm
by LittleBear
Probabley not directly, as I think the scanClass is set by the ship's entry in Shipdata, but this workaround might do it:-
Have the AI switch to an Explode state (copied from missileAI).
Have as a deathaction a spawn : shipclone.
Define the clone in shipdata as a likeship to the orginal, but with ScanClass THARGOID.
They'd be a flash and the ship appears to switch its scanClass to Thargoid.
Posted: Tue Mar 20, 2007 5:59 pm
by Charlie
Thanks LB
Posted: Tue Mar 20, 2007 9:30 pm
by LittleBear
Hang on: Only problem would be that if the player killed the ship a thargoid scanClass clone would appear (which might not be what you want). But if the switch to Explode was done under Energy Low, then it would be OK as the player coudn't kill the ship without triggering the switch (unless hit with an e-bomb or a missile). Hmm, probabley not an ideal solution on reflection!
Posted: Thu Mar 22, 2007 3:08 am
by Charlie
Your thoughts are much apppreciated.