Left/Right keys to control actor not working
Macca_McGill
Member, PRO Posts: 108
Hi All,
I've not been here for a while so slowly getting back into it. I know this is probably a very nooby question so I apologise in advance. I have checked out tutorial videos, the cookbook and other peoples problems on the forum but for some reason, I just can't get this to work. I'm basically just trying to get the left/right keys on my laptop to move the actor on screen. I've set a rule on the instance or the actor (tried on prototype too) to basically say if left/right keys are up, set actor x velocity to 0 else to move left -200, or right 200. (In the image below i've just used debug options to see if the keys are actually changing the value but they are not). The actor just does not move lol.
Comments
I'd just use:
If left key is pressed Move (set to 180°)
If right key is pressed Move (set to 0°)
Hi Socks,
Have tried using just if receives a key press left/right down, then move either 180 or 0 relative to scene and actor but it just doesnt move. Not really sure what i'm doing wrong here as it should work lol
Is movable checked?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
is any or all selected?
https://dropbox.com/s/f4sgkazkxl562jm/settings.png?dl=0
See above. I have moveable set and have tried just setting the left key, using all and any but nothing
Is that the only rule you have for that particular actor ?
At the minute socks yes, just trying to get it to move in one direction first lol
Click inside preview first. Windows Creator loses focus when previewing sometimes and makes it look like keyboard commands aren't working.
Here's the bug: http://bugs.gamesalad.com/show_bug.cgi?id=1145
Thanks, Have tried this but it's still not working. I'm currently running windows 7 professional on this laptop, do you know of any issues with that osx?
Have also tried running some of the example projects and keyboard commands do not work so I'm guessing it's down to that. Least then I know I was doing it right all along haha.
When I first started using GS Creator in Windows 8.
I noticed that Arrow keys would only work if after you make your edit to your rules, I'd have to restart GS Creator, and open the project fresh and click preview then click on the preview area and the arrow keys would work...but if you do any edits to your rule, or for me even opening up the rules to view then preview again, arrow keys would stop working.
I think maybe it's a bug but not sure...
I just tried this with the latest build, and the same thing is still happening.
while if you use other keys like ASDF they all work fine (as long as you click on the game to give it focus) and don't behave like the arrow keys described above.
I did fix an issue recently where the arrow keys wouldn't work when you had caps lock on, but it would have always failed, not intermittently. It was several builds ago though, so if you're up to date you shouldn't be seeing it now. It also wasn't Windows 8 specific.
I use a project with the arrow keys quite often in Windows 8.1and haven't seen any intermittent weirdness. I'll check again tomorrow, after fiddling with the rules. If you have any other info that might help me reproduce the issue it would be helpful.
nope just that it would only work for me If I just started GS Creator and load the project and preview right away. If i have been working with other projects and load it up, it wouldn't work either. I have included a simple project that I was able to reproduce this intermittent thing with that just has two rules hopefully you can reproduce it.
If I open up rules and view it or play around and change it back to arrow keys it'd stop working and i'd have to reopen GS fresh to have it working again.
Yeah the arrow keys are still a complete no-no for me. Just noticed I put windows 7 above, that should of said windows 8.1.
Have changed my keys to A/D for left/right and it work's fine.
It seems to be when you have the backstage for an actor visible when you start the preview. A workaround seems to be to select something else before you preview. I probably won't get a chance to look at it til sometime next week so maybe the workaround can help for now.
i had this issue as well, i use a portable keyboard. the arrow keys didnt work on the key board but i did the same as you and used A and D and it worked. weird
I am having the same issue setting keyboard movements is not working. I have tried everything I saw in this forum and have had no luck. @GeorgeGS did you fix the bug. This is a very simple and i'm sure widely used function for making a character move... why is this not fix yet? What do I do?
I have found a solution that worked for me. During preview I simply clicked on my actor before trying to use the arrow keys and that released the function.