To verify whether you got the node, write out some property associated with it. For example:
You have several pieces of logic that have to be
true before you get to your
print("okok...") statement, so I'd guess one or more of those are
I'd print out the interesting values there (
cursor_state) to make sure they are what you think they are.
if event is ... line looks ok to me. I'd guess if you remove the
if roll < ... line, you'll see your
okoko... print line.
Once that's verified, you just need to figure out what logic there is returning
But, none of that really has anything to do with accessing the node (the original question).