Jump to content

Are keyboard controls really limited to just movement keys?


Loki Eliot
 Share

You are about to reply to a thread that has been inactive for 4751 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm not much of a scripter. I'm trying to make a weapon that can smash open objects to get prizes. Im using a melee weapons script I found that takes control of movement keys. So you have to hold down mousse button then click forward key or left, right and back. My question is wether it's possible to allocate a different key, say the key 'Z' to activate/control weapon activation? I find it rather cumbersome to have to hold down the mouse button and use direction keys. has anyone developed something simpler?
Link to comment
Share on other sites

You can also get some extra combinations by pressing more than one of those keys simultaneously.  The bits are simply ORed together.

 

I found a few undocumented control bits:

0x40 Pitch forward - Only from the joystick, cannot disable the camera movement with llTakeControls.

0x80 Pitch Backwards - (ditto)

0x400 - Forward or Back, in addition to 0x1 or 0x2 respectively, if it's from the joystick or autorepeat has kicked in.

0x800 - Left or Right, in addition to 0x4 or 0x8 respectively, if it's from the joystick or autorepeat has kicked in.

0x2000000 - actually rotated left

0x4000000 - actually rotated right

 

With these flags, it is possible to distinguish most joystick/spacenavigator input from keyboard input, and to read 5 out of the 6 axes on a spacenavigator.   I still haven't found a way to get the 6th one.

Link to comment
Share on other sites

Main issue with the WASDEC approach is that  holding down the mouse does not actually override the WASDEC keys, so when my sword swipes, i still move forward. Is this because i've scripted something wrong or, is this just the accepted side effect?

Link to comment
Share on other sites

The movement is a sticky problem, yes.  You can set the passthrough to FALSE in your llTakeControls, but then the movement will not happen at all until you issue a new llTakeControls with a TRUE. You can try changing it with the mouse down and up events, it will probably take a little trial and error to get it how you like.

[ Wow, I edited entirely the wrong post, never mind what you saw here. ]

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4751 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...