Ok, so, you could use ectors, or as lucas said, int x, y, z;
Maybe something along the lines of this. This code wouldn't work correctly but screw off.
int x, y, z; //the players coordinates.
int jumping; //we'll just have this here in case you wanta make jumping;
//declare some sounds
sound step; sound jump; sound ambience;
void main() //hope I don't gotta explain this.
//load the sounds.
while(key_pressed(KEY_ESCAPE)=false) //Declare that the following will occur if the key escape is pressed.
move(forward); //call the move void, with the directcion of forward.
//do that for all the arrows.
void move(string direction) //call a move function, that will take the direction that you move.
Now that was thrown together in 5 minutes, and I don't even think that would work, considering I have a vary limited grasp on loops, for some reason they won't work for me, and that I'm not sure if I did the void with an enclosed var correctly. Please correct me if I did that rong, cause I'd love to learn myself.
yo! so I'm working on programing, it's really hard. But I'll tell you where you can contact me if your stupid enough to do so.
Contact information:email: [email protected]
Skype: Brennan Draves
I'm usually found on online games, chatting, and being warned bye admins for talking to much, f**k you admin!