Ayelius Posted May 24, 2021 Share Posted May 24, 2021 (edited) Hi all, is there a reliable way to check if an object reference or form is a grenade or mine? I tried using keywords but these are generally different for each grenade/mine. All mines seem to have the keyword 'WeaponTypeThrown'. But not all grenades have the keyword 'WeaponTypeGrenade', in fact only a few seem to have that. Elemental grenades like plasma or EMP have their own keyword (e.g. 'WeaponTypePlasmaGrenade') but I wouldn't want to check each and every one of those specialized keywords. And I would also like to avoid altering vanilla forms by adding new keywords. All grenades and mines seem to have the keyword 'WeaponTypeExplosive' but then again, the rocket launcher for instance has the same... So is there another way? Edited May 24, 2021 by Ayelius Link to comment Share on other sites More sharing options...
DieFeM Posted May 24, 2021 Share Posted May 24, 2021 If, for your purpose, you can check it when the weapon is equipped, you can use this:https://www.creationkit.com/fallout4/index.php?title=GetEquippedItemType_-_Actor Otherwise the only that differs on those weapons from any other weapon is that those do not use ammo, so you could use If !YourWeapon.GetAmmo() Link to comment Share on other sites More sharing options...
Ayelius Posted May 24, 2021 Author Share Posted May 24, 2021 Neat little trick, the latter works for me. Thanks a lot! Link to comment Share on other sites More sharing options...
DieFeM Posted May 24, 2021 Share Posted May 24, 2021 Actually, thinking it twice, no melee weapon uses ammunition.... so you would need to find out a way to discard melee weapons too. Link to comment Share on other sites More sharing options...
Recommended Posts