Upon ejecting, the player finds the replacement ship has several damaged pieces of equipment (assuming they were present on the original ship).
So, I need to:
- activate the script once the player ejects
- test for presence of undamaged equipment items that I wish to be affected
- change condition of those items to damaged
Code: Select all
this.shipLaunchedEscapePod = function()
{
if (player.ship.equipmentStatus("EQ_ECM") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_ECM") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_FUEL_SCOOPS") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_FUEL_SCOOPS") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_ENERGY_UNIT") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_ENERGY_UNIT") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_DOCK_COMP") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_DOCK_COMP") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_GAL_DRIVE") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_GAL_DRIVE") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_SCANNER_SHOW_MISSILE_TARGET") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_SCANNER_SHOW_MISSILE_TARGET") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_MULTI_TARGET") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_MULTI_TARGET") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_ADVANCED_COMPASS") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_ADVANCED_COMPASS") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_ADVANCED_NAVIGATIONAL_ARRAY") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_ADVANCED_NAVIGATIONAL_ARRAY") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_TARGET_MEMORY") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_TARGET_MEMORY") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_INTEGRATED_TARGETING_SYSTEM") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_INTEGRATED_TARGETING_SYSTEM") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_SHIELD_BOOSTER") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_SHIELD_BOOSTER") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_NAVAL_SHIELD_BOOSTER") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_NAVAL_SHIELD_BOOSTER") = "EQUIPMENT_DAMAGED";}
if (player.ship.equipmentStatus("EQ_WORMHOLE_SCANNER") == "EQUIPMENT_OK")
{player.ship.setEquipmentStatus("EQ_WORMHOLE_SCANNER") = "EQUIPMENT_DAMAGED";}
}
Same (lack of) result using escapePodSequenceOver.
Can anyone please tell me where I'm going wrong?