GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Control problem,please help me! >_

CloudWalkerCloudWalker Posts: 24Member
edited 9:08PM in Working with GS (Mac)
I've been working hard on my first GS game and my English.I wish you can understand what I'm talking about...

I have a Actor,a integer (called Dir).The Actor can moves up,down,left and right.When i press A,it goes left(change Dir to 1),D goes right(change Dir to 2),W goes up(change Dir to 3),S goes down(change Dir to 4).

When Dir is 1,goes left.
When Dir is 2,goes right.
When Dir is 3,goes up.
When Dir is 4,goes down.
When Dir is 0,stop.

Everything seems right,but here is the problem:

At first when I press A,it goes left,and I press W(Key A is still down) ,it goes up.So far so good,but at this time,key A is up(W is still down)the actor stop!!The problem is the seem on the other direction.

I think that is because when A is up,the Dir is 0,so it stop,whatever key is down early,it will stop.What can i do,please help me and excuse for my poor english.

Comments

This discussion has been closed.