what is the best way to move actor with arrows

rdcuberdcube Member Posts: 361
edited November -1 in Working with GS (Mac)
I've seen a couple of demos where you can control an actor with arrows to move up, down, left & right.
some of them utilize a boolean, some text, some integer, etc.

I know some will say, use whatever works for you, but we all know that performance is critical in this beta...

any recommendations?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    game engine only has to check two conditions (0 or 1) with a boolean so I would think it would be the most efficient.

    So in a button actor
    rule
    when touch is pressed
    change game.left to true
    otherwise change game.left to false

    then in moving actor
    when game.left = 1
    move
  • rdcuberdcube Member Posts: 361
    what about when u have several buttons?
    like when left and shoot? or when left down and shoot? and so on?
    I tried the text and it seemed to do ok, but it was mainly because of the template provided by gs.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Just have a boolean for each button actor. You can have multiple things going on at the same time. So I have a game where you have up, down, left, right, shoot up, shoot down and it works fine using a boolean for each action.
Sign In or Register to comment.