Dkspcy Posted June 17, 2024 Posted June 17, 2024 Hi, I'm trying to make a cursed weapon on the player after casting a Lesser Power that prevents it from being unequipped. I made a simple script to activate it when the Lesser Power is cast. Event OnEffectStart(Actor akTarget, Actor akCaster) Game.GetPlayer().EquipItem(CursedWeapon, true) endEvent So far so good, the cursed weapon can't be unequipped BUT if I press an assigned hotkey of a spell twice it forces the player to wield Dualcasting which breaks the immersion. This also occurs if I set it in the menu. Any thoughts how to prevent that?
traison Posted June 17, 2024 Posted June 17, 2024 Silly idea perhaps but equip a do-nothing spell in the left hand that can't be unequipped?
Dkspcy Posted June 17, 2024 Author Posted June 17, 2024 Unfortunately, I need the left hand for casting and switching to specific spells all the time, as it will use it those specific spells to channel effects on the cursed sword. I noticed it also happens to weapons too, dualwielding unequips forced equip. Was thinking if there was a way to disable dualwielding from accidentally doubletapping the hotkey?
traison Posted June 17, 2024 Posted June 17, 2024 (edited) 1 hour ago, Dkspcy said: Was thinking if there was a way to disable dualwielding from accidentally doubletapping the hotkey? Technically yes, but if we're limited to... say, Skyrim, I very much doubt it. Papyrus is not capable of such things. Inject a dll however and you're god, your word is law in Skyrim. You up for something like this? If so, my hint to you is to tap into WndProc and filter WM_INPUT. Handle your blocking when necessary, otherwise forward it as usual. Perhaps the smart approach would be to see if SKSE and/or CommonLibSSE already has something built in for this. The function can be toggled from Papyrus by exporting a Papyrus interface from the dll. You could also see about piggybacking on someone else. The MCM (i.e. SkyUI) has hotkeys. Whether these can override hardcoded game inputs I'm uncertain. Edited June 17, 2024 by traison 1
traison Posted June 17, 2024 Posted June 17, 2024 (edited) I suppose if you want to go the ditry route, there is the OnUnequipped event. You could unequip unwanted items, and equip the cursed weapon again. The reason why I call this dirty however is that it might look a bit janky. Edited June 17, 2024 by traison 1
Dkspcy Posted June 17, 2024 Author Posted June 17, 2024 (edited) I see, thanks for the input on this. Didn't realize it's more trouble that it seems, it's too much for my mind at this point lol. In the end, I settled with making the weapon into an armor accessory instead that way it doesn't get accidentally removed and not look weird visually, I went with your idea of using a blank spell but on the right hand instead. It works for what I'm after. Thanks again for the assistance! Edited June 17, 2024 by Dkspcy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now