i have two questions, and so i thought that i would put them in the same post.
the first is, is there a way to adjust the screen resolution in real-time?
the second is how could i make control options, so the player enters what keys he/she want the controls to be.
For the control options, you’d have to use Python to capture the keybinding for the keyboard, and then assign those to activate the key sensors / use those keybinding variables to activate the character functions.
For the control options, you’d have to use Python to capture the keybinding for the keyboard, and then assign those to activate the key sensors / use those keybinding variables to activate the character functions.
ive tried this but python didnt correctly extract the string from keyboard.event
I don’t think you would be extracting the string, but rather the keycode. For example, the left arrow key would be something like 147 - if you reference that keycode, it won’t give you the name of the key, but the keycode that you can use to test for Keyboard interaction.
yes, but getting the keycode it comes in a string. it comes with the keycode and state(just pressed, being pressed,just released, and released) and so it comes like this [ keycode, state]
i use this to try and extract(read) the keycode.
but for some reason the “key” property just simply returns the whole string.
it returns exactly like this when i add a print at the end.
key = [keycode, state]
i can’t seem to get anything to work. i may end up doing what i worst feared. i may need to make a sensors for every single key that i want them to be able to use. this might not tooooo bad but still its not my first chose