HailHell Posted January 31, 2015 Share Posted January 31, 2015 Is there a way to make blocking block 100% of the damage regardless of what is being use to block?If so how do i do that? I been messing around with global values but i just cant get it right... Link to comment Share on other sites More sharing options...
HailHell Posted February 7, 2015 Author Share Posted February 7, 2015 bump Link to comment Share on other sites More sharing options...
ArronDominion Posted February 7, 2015 Share Posted February 7, 2015 If you want to sift through the animation events and register for the animation events related to blocking. Once you register for the events, use OnAnimationEvent to switch your value to mimick blocking vs not blocking. I would use a binary system to keep track if you are using this as a value check within a OnHit() event On a brief look through on I saw a blockStop animation event for One-handed swords, but I am not sure if this is the right event or the other events. ---------------------------- Outside of this, while still using a binary system, unfortunately I believe (not 100% on this one) that you might need SKSE for this feature. Use GetMappedKey() to get the block key and assign it to a property, and use OnKeyDown() event to listen for the key being pressed. Since players will change block eventually, you will need to register for a menu event via RegisterForMenu("Main Menu") and have OnMenuClose event to re-assign the key after the main menu closes. Link to comment Share on other sites More sharing options...
HailHell Posted February 7, 2015 Author Share Posted February 7, 2015 thanks! Link to comment Share on other sites More sharing options...
HailHell Posted February 9, 2015 Author Share Posted February 9, 2015 How do i make this work??? scriptname scname extends formEvent OnKeyDown(Int 18) Debug.Trace("A registered key has been pressed") game.getplayer().SetInvulnerable() utility.wait(1.0) game.getplayer().SetInvulnerable(false)EndEvent Starting 1 compile threads for 1 files...Compiling "scname"...D:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\scname.psc(3,16): no viable alternative at input 'int'No output generated for scname, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on scname Link to comment Share on other sites More sharing options...
Mattiewagg Posted February 9, 2015 Share Posted February 9, 2015 You don't put in the # of the KeyCode. That's an event, not a function. You don't put actual values into the parameters. It should be Event OnKeyDown(Int KeyCode). Then put the code inside that event inside an If block (If KeyCode == 18). You need to register for that key somewhere first. Link to comment Share on other sites More sharing options...
HailHell Posted February 9, 2015 Author Share Posted February 9, 2015 -facepalm- Link to comment Share on other sites More sharing options...
HailHell Posted February 9, 2015 Author Share Posted February 9, 2015 GetMappedKey() gets returned as -1 and nothing happens in game help plz Scriptname L00VScBlock extends formactorbase property playerref auto Event OnKeyDown(int keycode) RegisterForKey(-1) If KeyCode == -1 Debug.messagebox("A registered key has been pressed") playerref.SetInvulnerable() utility.wait(1.0) playerref.SetInvulnerable(false) endifEndEvent Link to comment Share on other sites More sharing options...
HailHell Posted February 9, 2015 Author Share Posted February 9, 2015 ok forward key returns 17 i tried to use that too but nothing happens either Link to comment Share on other sites More sharing options...
Mattiewagg Posted February 9, 2015 Share Posted February 9, 2015 You can't register for the key inside the event. OnKeyDown won't be received until you've registered so you have to register in a different event, like OnInit(). Link to comment Share on other sites More sharing options...
Recommended Posts