jacklul Posted September 27, 2023 Share Posted September 27, 2023 I thought something like this would work but it doesn't: if player.GetSpaceShip.GetItemCount 3fb19 > 0 ; player.GetSpaceShip.EquipItem 3fb19 ; else ; print "No repair item found!" ; endif I don't think there is a way to grab a ref to ship in one-liner fashion?Even if I go past that I have no idea how to "use" Ship Parts when ref'ed as the ship, equipitem doesn't seem to work. Link to comment Share on other sites More sharing options...
HeyYou Posted September 27, 2023 Share Posted September 27, 2023 On PC, just poke the "O" key to repair the hull.... systems will repair themselves slowly. Or are you trying to have the ship automatically repair itself? Link to comment Share on other sites More sharing options...
jacklul Posted September 27, 2023 Author Share Posted September 27, 2023 (edited) I am trying to have one button use best available healing item while on foot and repair the ship when in space, I have the healing part fully done. [Macros] HealBest=if Player.GetItemCount 2A9DE8 > 0 ; Player.EquipItem 2A9DE8 ; else ; if Player.GetItemCount 29A847 > 0 ; Player.EquipItem 29A847 ; else ; if Player.GetItemCount ABF9 > 0 ; Player.EquipItem ABF9 ; else ; print "No healing item found!" ; endif ; endif ; endif HealPlayer=if Player.GetAV Health < Player.GetBaseAV Health ; HealBest ; else ; print "Already fully healed!" ; endif RepairBest=if Player.GetSpaceShip.GetItemCount 3fb19 > 0 ; Player.GetSpaceShip.EquipItem 3fb19 ; else ; print "No repair item found!" ; endif RepairShip=if Player.GetSpaceShip.GetAV Health < Player.GetSpaceShip.GetBaseAV Health ; RepairBest ; else ; print "Already fully repaired!" ; endif [Hotkeys] T=if Player.IsInSpaceship == 0 ; HealPlayer ; else ; RepairShip ; endif There is a small flaw in Player.GetAV Health < Player.GetBaseAV Health as it doesn't account for buffs and modifiers but it will usually be close to full HP anyway so no point in healing. Edited September 27, 2023 by jacklul Link to comment Share on other sites More sharing options...
jacklul Posted September 28, 2023 Author Share Posted September 28, 2023 Looks like this will be a bit more tricky as space stations and ship interiors are also returning IsInSpaceship as 1... Link to comment Share on other sites More sharing options...
Recommended Posts