Posted: Sun Jul 06, 2008 10:35 pm |
|
Quote: |
I ran the scene and could move using the LRUD keys. In the console I typed SetInputStyle(INPUT_STYLE_WSAD) and found that I could not move at all. |
This replace current input setting by WSAD feature. You should can & only can move with W,S,A,D keys. Please try to press F3 to reset all input config first.
Quote: |
I then reran the scene and tried SetInputStyle(ModifyStyle(GetInputStyle(),0,INPUT_STYLE_WSAD)) and same result. What am I doing wrong? |
You've added a WSAD feature to current input setting. The problem maybe in input config.
Quote: |
What does to second parameter in ModifyStyle actually do? and what are the different values allowed for this parameter? |
You can think every parameter in ModifyStyle as a features set. So the first parameter is the original features set; the function will remove the features expressed by second parameter from original features; and add the features expressed by third parameter to original features. You can use the
orDWORD function to connect several feature flags to one parameter,
e.g.
SetInputStyle( ModifyStyle( GetInputStyle(), INPUT_STYLE_AXIS, orDWORD(INPUT_STYLE_JD, INPUT_STYLE_WSAD, INPUT_STYLE_EX) ) ) |
the code remove AXIS feature from current input setting; and one time add JD,WSAD and EX features to current input setting.