niccolo Posted October 12, 2010 Share Posted October 12, 2010 Okay, so I'm whirring away at a mod and the pieces are starting to fall into place; I'm typnig out the code when I realise I'm stuck at a point... My mod basically replaces one set of power armour with another - so you can talk to someone and they'll take your outcast power armour and give you a Brotherhood power armour or vice-versa - as an example. Anyway, I want to set it so that the armour you get in return has equal condition to the one given away and I thought to do this via globals; set a global to the condition of the first armour and then generate a second armour in equal condition. I know how to set an item's health, but I don't know how to retrieve the condition of the specific armour lifted out of the player's inventory. Does anyone have an idea? (Yes, I'm willing to use FoSE... as soon as I remember how to get it into GECK) Link to comment Share on other sites More sharing options...
rickerhk Posted October 12, 2010 Share Posted October 12, 2010 Even with FOSE, you can't get the current health of an item in a container. You can get the health if the player has it equipped, though, with the FOSE commands GetHealth http://fose.silverlock.org/fose_command_doc.html#GetHealth and GetEquippedCurrentHealth http://fose.silverlock.org/fose_command_doc.html#GetEquippedCurrentHealth Then divide the two results to get the health percent. The numbers these two functions return are the base 'hitpoint's for the item, and the current number of hitpoints (health) left. Link to comment Share on other sites More sharing options...
phoneyLogic Posted October 12, 2010 Share Posted October 12, 2010 + :thumbsup: Link to comment Share on other sites More sharing options...
niccolo Posted October 13, 2010 Author Share Posted October 13, 2010 Hmm. I wonder... I could force equip the armour to read it. Only real problem there is then the player is left naked. Okay, thank you for your information! That was really useful. Link to comment Share on other sites More sharing options...
Recommended Posts