vltrius Posted August 8, 2013 Share Posted August 8, 2013 (edited) Just curious, trying to make some mods for the PC when they aren't equipped with any weapons, including Unarmed (or Hand to Hand) weapons. If there's a command or function or variable that will find this out for you (whether or not the player has a weapon equipped), that would be great to know too. I tried using "Fists" (in the Items->Weapons tab in Geck) but apparently that's not for the PC (seems like NPC only). Edited August 8, 2013 by vltrius Link to comment Share on other sites More sharing options...
jazzisparis Posted August 8, 2013 Share Posted August 8, 2013 ref rWeapon (...) set rWeapon to player.GetEquippedObject 5 In the above example, rWeapon is set to the weapon equipped by the player. If equals 0, it means no weapon is currently equipped (in other words, fists are used). Note: GetEquippedObject is a NVSE function. Link to comment Share on other sites More sharing options...
vltrius Posted August 8, 2013 Author Share Posted August 8, 2013 (edited) Thanks! Any tutorials for using NVSE with Geck? (or do I use something else? Apologies, still new to this) Unrelated, but I find it a bit funny that you can GetGameSetting but can't actually modify them in any way (Seems like SetGameSetting or ModGameSetting would have been really useful). Edited August 8, 2013 by vltrius Link to comment Share on other sites More sharing options...
vltrius Posted August 9, 2013 Author Share Posted August 9, 2013 (edited) So after having done some testing the GetEquippedObject still seems to return Unarmed Weapons as though the player is not equipped with a weapon. scn 00SunFistScript int refStat ref rWeapon Begin GameMode set rWeapon to Player.GetEquippedObject 5 if refStat == 1 if rWeapon == 1 Player.ModAV UnarmedDamage -100 Set refStat to 0 endif endif if refStat == 0 if rWeapon == 0 Player.ModAV UnarmedDamage 100 Set refStat to 1 endif endif EndI don't think there's anything wrong with the code (aside from the obvious "using UnarmedDamage" - I'm not sure what should be used in its place to modify attack damage), as the effect doesn't occur on any other weapons (such as a Katana or Laser Rifle) but still occurs on Unarmed Weapons (such as the Paladin Toaster, Boxing Tape). I feel like what I should be using is .SetAttackDamage but that requires an ID and I don't think I can call the player's fists with it. Edited August 9, 2013 by vltrius Link to comment Share on other sites More sharing options...
jazzisparis Posted August 9, 2013 Share Posted August 9, 2013 Try this, instead: scn 00SunFistScript short bBonusApplied begin GameMode if bBonusApplied != (player.GetEquippedObject 5 == 0) set bBonusApplied to (bBonusApplied == 0) if bBonusApplied player.ModAV UnarmedDamage 100 else player.ModAV UnarmedDamage -100 endif endif end Link to comment Share on other sites More sharing options...
vltrius Posted August 10, 2013 Author Share Posted August 10, 2013 (edited) So, I hope you don't mind me asking a logic question. Is the reason the above statement works is because of the fact that you are testing and then setting bBonusApplied to TRUE if it's equal to 0, rather than setting bBonusApplied to 0 directly? Also, do entry points only work when you have some form of "equipped" weapon? Even just flat out modifying attack speed by a large percentage doesn't seem to apply if you aren't equipped with a weapon (Katana, Boxing Tape, Rifle, etc.) Edited August 10, 2013 by vltrius Link to comment Share on other sites More sharing options...
Recommended Posts