i found code for arcade style (arrow keys) movement and i think it was from an old version
i had to rework some of the code i found and i got some help from the help file, but it still giving me a "(" error and ive checked all the counting of ( and {
i hope its not some dumb fix so I don't feel stupid but if anyone could help me out would be great
btw its in the function on_key_press(int keycode) in the global script
Code: ags
thanks alot guys/gals in advance
i had to rework some of the code i found and i got some help from the help file, but it still giving me a "(" error and ive checked all the counting of ( and {
i hope its not some dumb fix so I don't feel stupid but if anyone could help me out would be great
btw its in the function on_key_press(int keycode) in the global script
if (keycode==372) { // up arrow
character[EGO].WalkStraight(player.x, player.y-200);
while ((IsKeyPressed(372)>0) && (character[EGO].WalkStraight)) Wait(1);
StopMoving(EGO);
}
if (keycode==375) { // left arrow
character[EGO].WalkStraight(player.x, player.x-200, player.y);
while ((IsKeyPressed(375)>0) && (character[EGO].WalkStraight)) Wait(1);
StopMoving(EGO);
}
if (keycode==377) { // right arrow
character[EGO].WalkStraight(player.x, player.x+200, player.y);
while ((IsKeyPressed(377)>0) && (character[EGO].WalkStraight)) Wait(1);
StopMoving(EGO);
}
if (keycode==380) { // down arrow
character[EGO].WalkStraight(player.x, player.x, player.y+200);
while ((IsKeyPressed(380)>0) && (character[EGO].WalkStraight)) Wait(1);
StopMoving(EGO);
}
thanks alot guys/gals in advance
