SpartanISW108 Posted April 2, 2014 Author Share Posted April 2, 2014 And done like this would mean it's 100% compatible with modded weaponry as well as able to detect when fists and quest objects are equipped so you don't lose them? Link to comment Share on other sites More sharing options...
devinpatterson Posted April 2, 2014 Share Posted April 2, 2014 And done like this would mean it's 100% compatible with modded weaponry I couldn't say since I haven't done it, but it shouold be fine with modded weapons (retain all mods etc), the same as if you dropped it via the inventory screen as well as able to detect when fists and quest objects are equipped so you don't lose them? May or may not, I don't know if fists can be dropped, but its not hard to put a condition on it != assuming fists have a form id. In regard to quests I don't know if the drop function bypasses the quest flag, or not. If it does, then I don't see any obvious way to prevent it. Link to comment Share on other sites More sharing options...
SpartanISW108 Posted April 2, 2014 Author Share Posted April 2, 2014 I'm looking myself and the getequipped command required you to give it a reference, not used to actually get a reference of what you have equipped. Am I using it wrong? Link to comment Share on other sites More sharing options...
devinpatterson Posted April 2, 2014 Share Posted April 2, 2014 I'm looking myself and the getequipped command required you to give it a reference, not used to actually get a reference of what you have equipped. Am I using it wrong? getEquippedObject gets us a string to fill a rVar, which is used by the drop function (it's a NVSE function), but as I mentioned it returns a base ID and we need a refID. But the drop function needs to be passed a refID. getEquippedObject that can be directed to check the weapon (equip slot #5), but it returns a base value and we need a ref. Link to comment Share on other sites More sharing options...
SpartanISW108 Posted April 2, 2014 Author Share Posted April 2, 2014 http://geck.bethsoft.com/index.php?title=GetEquippedI just tried the command and it says it needs a reference Link to comment Share on other sites More sharing options...
devinpatterson Posted April 2, 2014 Share Posted April 2, 2014 http://geck.bethsoft.com/index.php?title=GetEquipped I just tried the command and it says it needs a reference Read my post just above, getEquippedObject, I'm not using getEquipped. Not too sure how much clearer I can make it brother. Link to comment Share on other sites More sharing options...
SpartanISW108 Posted April 2, 2014 Author Share Posted April 2, 2014 I tried that also, and it still says I need a reference. I'm sorry I'm coming across as incompetent, I'm just really not good with scripts Link to comment Share on other sites More sharing options...
devinpatterson Posted April 2, 2014 Share Posted April 2, 2014 I tried that also, and it still says I need a reference. I'm sorry I'm coming across as incompetent, I'm just really not good with scripts Your not incompetant, we all have to learn, no one has this knowledge genetically included in our genome. Think about what your asking it. You: "What weapon is being held?" Geck: "what weapon for who/whom?" You: "playerRef.getEquippedObject" Geck: "Oh you wanna know what the player is holding, OK" Link to comment Share on other sites More sharing options...
devinpatterson Posted April 2, 2014 Share Posted April 2, 2014 I have to finish up here at work, so I don't get out late, but I may be able to help later (can't guarntee it though, have a lot of mods and requests on my plate). But I'd suggest just going through the scripting tutorials, there's a ton of em. Link to comment Share on other sites More sharing options...
SpartanISW108 Posted April 3, 2014 Author Share Posted April 3, 2014 (edited) EDIT: Got it working and merged it into the script for Grabby Fingers. scn GrabbyFingersQuestScript ref rGrabbed ref rGrabbing short sEquipGrabbed short sGrabbedCount float keyHeldTimer short DropKeyPressed ref rWeaponEquipped begin gamemode set rGrabbed to rGrabbing set rGrabbing to GetPlayerGrabbedRef set rGrabbing to rGrabbing.getbaseobject IF rGrabbing set sGrabbedCount to player.getitemcount rGrabbing ELSEif rGrabbed IF player.getitemcount rGrabbed > sGrabbedCount player.equipitem rGrabbed 0 1 ENDif ENDif endif if IsKeyPressed 45 set DropKeyPressed to 1 elseif DropKeyPressed == 1 set rWeaponEquipped to player.geteqobj 5 player.unequipitem rweaponequipped 1 player.drop rweaponequipped 1 set DropKeypressed to 0 set rWeaponEquipped to 0 endif end The weapon sometimes ends up clipping into terrain and falling under it, but oh well. Beggars can't be choosers. I did the part from "if IsKeyPressed 45" All from looking up similar scripts which did different things. Thank you for your help. If you know a way to stop some weapons clipping into and through terrain that'd be great. Edited April 3, 2014 by ilyasw Link to comment Share on other sites More sharing options...
Recommended Posts