F4llfield Posted May 23, 2024 Share Posted May 23, 2024 Hi all, What would be the best way to detect if an NPC is wearing a power armor by script ? Link to comment Share on other sites More sharing options...
F4llfield Posted May 23, 2024 Author Share Posted May 23, 2024 Hi,found this in the foreum: Keyword Property pIsPowerArmorFrame Auto Const Mandator Function CheckForPowerArmor(Actor akActor) If(akActor.WornHasKeyword(pIsPowerArmorFrame) == true) dothis.... endif Hopes it help someone else... 2 Link to comment Share on other sites More sharing options...
F4llfield Posted June 10, 2024 Author Share Posted June 10, 2024 Thanks! Link to comment Share on other sites More sharing options...
DlinnyLag Posted June 10, 2024 Share Posted June 10, 2024 See Actor.IsInPowerArmor Link to comment Share on other sites More sharing options...
LarannKiar Posted June 10, 2024 Share Posted June 10, 2024 4 hours ago, DlinnyLag said: See Actor.IsInPowerArmor It's a working alternative indeed but there's unfortunately a problem with it.. it checks for the PA perk: ; Return true if this actor is in power armor bool Function IsInPowerArmor() ;Return if the actor has the Power Armor Perk Return HasPerk(Game.GetFormFromFile(0x0001F8A9, "Fallout4.esm") as perk) EndFunction There's an engine bug that can cause this perk to get stuck on an NPC.. extremely rare in vanilla but it's still there. Here's the original discussion about it (from 2021). In short: IF an NPC's 3D unloads while; 1) being mounted on a Vertibird AND 2; wearing a Power Armor; THEN the PA perk gets stuck (becomes completely unremovable with vanilla Console/Papyrus RemovePerk(), thus even the vanilla code can't remove it on PA exit). 1 Link to comment Share on other sites More sharing options...
Recommended Posts