WondraBox Posted July 2, 2020 Share Posted July 2, 2020 I am trying to make a mod where I need to have the player unable to harm anything while wearing a piece of armor. Its basically an enchantment I want to make without going into too much detail of what its for. I have been trying the different damage modifiers in the creation kit but none of them subtract damage, only add to it. I have also tried the etherealize effect arch type under magic effects but that didnt work either. I tried messing with making a custom perk in a magic effect then placing it on an enchantment and still nothing. I have been at this for hours. i believe the only way to do it is through scripting. I know basic scripting but really have never scripted anything in papyrus. Would anyone have any ideas? Link to comment Share on other sites More sharing options...
maxarturo Posted July 3, 2020 Share Posted July 3, 2020 A quick and simple way to do this is to put a simple script on the armor. Event OnEquipped(Actor akActor) Game.DisablePlayerControls(0, 1, 0, 0, 0, 0, 0) EndEvent Event OnUnequipped(Actor akActor) Game.EnablePlayerControls() EndEvent * There are also other ways you can do this. Link to comment Share on other sites More sharing options...
WondraBox Posted July 3, 2020 Author Share Posted July 3, 2020 Would that not allow the player to move? I still need them to be able to move, just not be able to do any damage with weapons, spells, or melee. Link to comment Share on other sites More sharing options...
maxarturo Posted July 3, 2020 Share Posted July 3, 2020 (edited) The player retains full control while wearing your armor but he can't do combat unless he unequips it.* As long as this line:Game.DisablePlayerControls(0, 1, 0, 0, 0, 0, 0)DOES NOT CHANGE !. * This is the simplest way to do this. SSE forum link bellow:https://forums.nexusmods.com/index.php?/forum/4070-skyrim-special-edition-creation-kit-and-modders/ I hope it helps. Edited July 3, 2020 by maxarturo Link to comment Share on other sites More sharing options...
WondraBox Posted July 5, 2020 Author Share Posted July 5, 2020 Sorry for not getting back to you, I had things come up over the past couple of days. I am going to try this right now and let you know how it works. thank you! Link to comment Share on other sites More sharing options...
WondraBox Posted July 5, 2020 Author Share Posted July 5, 2020 So I copied the script exactly as you wrote it into a new magic effect. I made sure that it was script, on self, constant effect, compiled it, and it did not work. I then tried adding some properties to the script, even though I have no idea what i am doing in that sense. I tried making a property that made it so it would run on the player, but still did not work. I can still do damage to NPC's. Link to comment Share on other sites More sharing options...
maxarturo Posted July 5, 2020 Share Posted July 5, 2020 "So I copied the script exactly as you wrote it into a new magic effect" What...?? I clearly dictated to : "A quick and simple way to do this is to put a simple script on the armor." I didn't said anything about a "Magic Effect", you can do this with a magic effect but requires a different approach. Open your armor in CK, the armor's property window and place the script there, it should extend "ObjectReference". Link to comment Share on other sites More sharing options...
WondraBox Posted July 5, 2020 Author Share Posted July 5, 2020 (edited) SOLVED!I figured it out! I found someone else's script that did something similar, and kind of mixed it with the code you posted. It was a lot of trial and error, but It now works! Thank you for your help!and for anyone who wants to use it here is the code and it is set up as a magic effect script so that it can be applied to an armor piece and disenchanted so you can put it on other items:Scriptname PlayerDealsNoDamage extends activemagiceffect Bool Property Fighting = false autoEVENT OnEffectStart(Actor akTarget, Actor akCaster) Game.DisablePlayerControls(Fighting) Game.EnablePlayerControls(true, false, true, true, true, true, true, true)ENDEVENTEVENT OnEffectFinish(Actor akTarget, Actor akCaster) Game.EnablePlayerControls(true, true, true, true, true, true, true, true)ENDEVENT Edited July 5, 2020 by WondraBox Link to comment Share on other sites More sharing options...
Recommended Posts