Jump to content
ℹ️ Intermittent Download History issues ×

How to Block 100% Help!


HailHell

Recommended Posts

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

How do i make this work???

 

scriptname scname extends form

Event 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

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

GetMappedKey() gets returned as -1 and nothing happens in game help plz

 

Scriptname L00VScBlock extends form

actorbase 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)
endif
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...