Register  |  FAQ  |  Search  |  Memberlist  |  Usergroups  |  Log in 
Reply to topic
 INPUT_STYLE 
matty47


Joined: 27 Nov 2007
Posts: 21
Reply with quote
Hi, trying to understand the Input Style. I was having trouble with the FPS tute so I made a scene with a plane surface and a cube on the plane for reference. 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. I then reran the scene and tried SetInputStyle(ModifyStyle(GetInputStyle(),0,INPUT_STYLE_WSAD)) and same result. What am I doing wrong?? I did also try disabling the accelerator keys. My biggest hurdle is learning how to program this wonderful engine. What does to second parameter in ModifyStyle actually do? and what are the different values allowed for this parameter? Sorry for all the (probably dumb) questions.
Thanks
Matthew
View user's profile Send private message
  
Vincent


Joined: 25 Dec 2006
Posts: 296
Reply with quote
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.

Code:
 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.
View user's profile Send private message
  
matty47


Joined: 27 Nov 2007
Posts: 21
Reply with quote
Thanks for the examples I will give this a try.
View user's profile Send private message
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic