Search the Community
Showing results for tags 'Keyboard'.
-
Hello. I'm working on a demo for my upcoming game, and while I was working on it, I wanted to add the ability to bind keys in the options menu. I've already made the GUI code (in Lua) to make a second tab, add buttons for every movement, etc... The problem is I can't figure how to listen for keyboard/mouse input. As you can see, I've chosen buttons and not TextInput. When you click a button, a panel opens with a text. This panel will only close when the user will press a button or hit escape. And this is where I'm stuck. How can I listen for any keyboard or mouse input? Also, I had another question: How can I save options? How can I save options (keyboard input, graphical options, ...) to load them when the game starts? Or does Leadwerk already do that every time the user hit apply in the options panel? Thank you very much, I hope I've explained myself enough.
-
Question above.
-
Hi. i'm new to Leadwerks and I started scrpiting in lua. When i try to make basic controller i discovered that bug (or my mistake). Here is one of scripts which i (try to) make. Script.player = "" --entity "Player" function Script:Start() end function Script:Update() if window:KeyDown(Key.D) then print("D Pressed") right() end end function Script:right() ppos = self.player:GetPosition() self.player:SetPosition(ppos+Vec3(3,0,0)) end When it launched i didn't get any console replys about pressed D and my character didn't move. At the end sorry for my English. That text could have errors.