Making rules to move actor with keyboard but nothing happens.

LucasJG1994LucasJG1994 Member Posts: 28
edited October 2015 in Tech Support


I assigned one of the keys to the actor to move but nothing happens. What do I do?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    That tells us nothing show a screen shot of your code please.

  • LucasJG1994LucasJG1994 Member Posts: 28

    here's the code

  • BellowBellow Bartender Member, PRO Posts: 227

    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

  • LucasJG1994LucasJG1994 Member Posts: 28

    @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.

  • SocksSocks London, UK.Member Posts: 12,822

    @LucasJG1994 said:
    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.

  • LucasJG1994LucasJG1994 Member Posts: 28

    @Socks

    I did that, nothing works. :(

  • SocksSocks London, UK.Member Posts: 12,822

    @LucasJG1994 said:
    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.

  • LucasJG1994LucasJG1994 Member Posts: 28

    @Socks

    Did that too.

  • IceboxIcebox Member Posts: 1,485

    @LucasJG1994 Are you sure your actor is set to moveable ?

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    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

  • Thunder_ChildThunder_Child Member Posts: 2,343

    Should t your actor being moving in relation to scene...not actor?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Thunder_Child said:
    Should t your actor being moving in relation to scene...not actor?

    Good catch I saw that too.

  • LucasJG1994LucasJG1994 Member Posts: 28

    @all

    Thanks for the replies, I'll give it another go.

Sign In or Register to comment.