Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
The built-in First Person Shooter camera uses the mouse point as the view focus. I don't want to use the mouse at all for viewing. I want something similar the to the "old school" DOOM controls. W and Arrow UP = Forward S and Arrow Down = Backward Walk A and Arrow Left = Rotate -90 counterclockwise D and Arrow Right = Rotate 90 clockwise Shift = Jump (optional) Can someone help me figure out how to implement this into the game? |
||||
|
Before First Draw (and also on reload): Set Variable "W" =0 Set Variable "A" =0 Set Variable "S" =0 Set Variable "D" =0 When W key is pressed: If Variable "W" =0, Change Position of "Player_node" (vector in facing direction) 0,5,0 Set Variable "W" =1 When A key is pressed: If Variable "A" =0, Change Position of "Player_node"(vector in facing direction) 0,-5,0 Set Variable "A" =1 When A key is pressed: If Variable "A" =0, Rotate "Player_node" (rotate by rotation) 0,-90,0 Set Variable "A" =1 When S key is pressed: If Variable "S" =0, Rotate "Player_node" (rotate by rotation) 0,-90,0 Set Variable "S" =1 When W key is released: Set Variable "W" =0 When S key is released: Set Variable "S" =0 When A key is released: Set Variable "A" =0 When S key is released: Set Variable "S" =0 |
||||
|
I'm dyslexic - I made a mistake with the letters, hopefully you can see what I did wrong and make it work by substituting the correct letters. |
||||
|
I think this version is correct.... Before First Draw (and also on reload): Set Variable "W" =0 Set Variable "A" =0 Set Variable "S" =0 Set Variable "D" =0 When W key is pressed: If Variable "W" =0, Change Position of "Player_node" (vector in facing direction) 0,5,0 Set Variable "W" =1 When A key is pressed: If Variable "A" =0, Change Position of "Player_node"(vector in facing direction) 0,-5,0 Set Variable "A" =1 When S key is pressed: If Variable "S" =0, Rotate "Player_node" (rotate by rotation) 0,-90,0 Set Variable "S" =1 When D key is pressed: If Variable "D" =0, Rotate "Player_node" (rotate by rotation) 0,90,0 Set Variable "D" =1 When W key is released: Set Variable "W" =0 When S key is released: Set Variable "S" =0 When A key is released: Set Variable "A" =0 When S key is released: Set Variable "S" =0 |
||||
|
|