Discussion and information relevant to creating special missions, new ships, skins etc.
Moderators: winston , another_commander
Wildeblood
---- E L I T E ----
Posts: 2458 Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:
Post
by Wildeblood » Thu Jul 21, 2011 7:03 pm
I'm embarrassed to ask this because it's such a simple question, but how do I delete mission variables set by an equipment OXP, when the equipment is removed? I.e. this will look familiar:
Code: Select all
this.playerBoughtEquipment = function(equipmentKey)
{
if(equipmentKey == "EQ_WHATEVER_REMOVAL")
{
player.ship.removeEquipment("EQ_WHATEVER");
player.ship.removeEquipment("EQ_WHATEVER_REMOVAL");
player.credits += (EquipmentInfo.infoForKey("EQ_WHATEVER").price * 0.1 * 0.6);
}
}
While EQ_WHATEVER was in use it stored a parameter in a missionVariable_whatever_param. What do I need to add to the code above to clean that up?
Okti
---- E L I T E ----
Posts: 700 Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8
Post
by Okti » Thu Jul 21, 2011 7:07 pm
Wildeblood
---- E L I T E ----
Posts: 2458 Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:
Post
by Wildeblood » Thu Jul 21, 2011 7:24 pm
Really? That seems too obvious... it works though.Thanks, Okti.
Lone_Wolf
---- E L I T E ----
Posts: 546 Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands
Post
by Lone_Wolf » Thu Jul 21, 2011 10:32 pm