ID:941852
 
here, i will show what i use for blocking in my game. when you hold down the block button(q), the mob goes into a blocking stance and when players attack, it does nothing.
we need 3 verbs and 1 variable and 2 macros with the same key.
mob
var
blocking = 0
guardd = 100000
verb
c1()
blocking = 1
block()
c2()
blocking = 0
block()

these are the macro verbs.
i have custom interface so i use the macro maker.
anyhow...
you just use the "key up" feature for in this case, c2().
make another macro.
just a regular one with the same key that uses c1().
mob
var
blocking = 0
verb
c1()
blocking = 1
block()
c2()
blocking = 0
block()
Block()
if (blocking == 0)
step_size = 8
if (icon_state == "Guard")
icon_state = "walk"
if (defense == guardd)
defense = d2
else
//do nothing
else
step_size = 1
icon_state = "Guard"
defense = guardd

this is the block verb.
when the key is up, its disables the variable thus, disabling the block. make sure to call the block verb in the macro verbs!
when the key is pressed, blocking is not 0 so dm calls upon the "else" function. it tells dm to start blocking. this is your key hold system!.
it acts a a key sensor.
i thought of this myself. feel free to use it.
if anything, reply to the post please.
It's a lot easier to use Forum_account's Keyboard library which provides this for every key. It has 2 verbs that are assigned to every key which pass the key pressed into a proc that you can override to do what you need to do.
oh. ive never heard of it though, but thanks.