Jump to content

How to Detect When the Player Is Using Bare Fists?


user826

Recommended Posts

Hey, everyone! Can anyone tell me if there's a way to detect whether the player is using their bare fists? Apparently, the "Fists" weapon is actually unused in the game, and bare fists do not register as Unarmed weapons, so my perk isn't triggering properly. Any help is appreciated!

Link to comment
Share on other sites

Hey, everyone! Can anyone tell me if there's a way to detect whether the player is using their bare fists? Apparently, the "Fists" weapon is actually unused in the game, and bare fists do not register as Unarmed weapons, so my perk isn't triggering properly. Any help is appreciated!

 

Is this for a script? If so:

 

https://geckwiki.com/index.php?title=GetEquippedObject

If Player.GetEquippedObject 5 == 0
	
	;Put the code here
	
Endif
Link to comment
Share on other sites

It's for a Perk condition, although I suppose the function should still work in that scenario. Is there a way to do it using only vanilla GECK, though? I don't use NVSE in my mods.

 

EDIT: I had the idea to go in-game, equip the fists, and run the command in the console. However, it returns nothing, which means the game doesn't consider the fists to be an equipped object at all.

Edited by user826
Link to comment
Share on other sites

If the fist indeed don't qualify as any of the weapon types maybe you can use a different perk entry that checks for it NOT belonging to ANY of the weapon types and then having the effect apply.

 

And yes, the command returns a null reference when fist are equipped, I too had that problem in one of my mods.

Link to comment
Share on other sites

@UnvalidUserName - That's a good idea! I was looking at the wiki entry for the GetWeaponAnimType, and it has a return value for unset or unrecognized Animation Types. Maybe I can use that instead, although I'm not sure what other weapons might trigger it.

 

EDIT: No joy. The perk didn't trigger with GetWeaponAnimType == 0, and running "player.GetWeaponAnimType" in the console returns 1 (Hand to Hand), so it SHOULD be considered an Unarmed weapon, yet it's also not.

Edited by user826
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...