Making rules to move actor with keyboard but nothing happens.
LucasJG1994
Member Posts: 28
I assigned one of the keys to the actor to move but nothing happens. What do I do?
Comments
That tells us nothing show a screen shot of your code please.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
here's the code
with this one when you hit W button your actor will move right side with speed of 300 .
try to put it actor not prototype.
if this not work try this make the same rule when W key down
do
change attribute
choose actor self - motion - velocity - x to 100
andd if you want to go left side
same rules - x -100
if you want to stop your actor when you are not pressing anything
create a new rule
if key w is up
if key (left side key) is up
do
change attribute
actor self - motion- velocity - x to 0
@Bellow
Thanks for the reply but the problem lies within the key function.
For example: I tested it with the mouse button and it worked fine, but when I added the key function for the keyboard the actor doesn't move even if you use the mouse button.
Swap the controls to another button (for example the Space Bar or the Right Arrow) key - to see if the will work.
@Socks
I did that, nothing works.
Mmmmmm . . . . . try and even more simple test on a new actor.
Make a new actor, give it a simple rule based on a key press, for example when W is pressed change colour red to 0 . . . see if that works.
@Socks
Did that too.
@LucasJG1994 Are you sure your actor is set to moveable ?
If you're using a 13.x version, make sure you've clicked the preview window to give it focus and if you're using arrow keys you need to make sure there's no actor selected in the scene before you preview.
Both issues are fixed in the preview release: http://forums.gamesalad.com/discussion/89294/windows-creator-preview-release
Should t your actor being moving in relation to scene...not actor?
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Good catch I saw that too.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@all
Thanks for the replies, I'll give it another go.