Scripting question...

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Charlie
---- E L I T E ----
---- E L I T E ----
Posts: 262
Joined: Wed Sep 27, 2006 5:33 pm

Scripting question...

Post 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... :wink: :twisted:
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---

Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main

Charlie
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Charlie
---- E L I T E ----
---- E L I T E ----
Posts: 262
Joined: Wed Sep 27, 2006 5:33 pm

Post by Charlie »

Thanks LB
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---

Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main

Charlie
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Charlie
---- E L I T E ----
---- E L I T E ----
Posts: 262
Joined: Wed Sep 27, 2006 5:33 pm

Post by Charlie »

Your thoughts are much apppreciated.
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---

Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main

Charlie
Post Reply