Help with move character

Started by Mr.Trant, Sat 10/05/2003 00:47:11

Previous topic - Next topic

Mr.Trant

is there any way to make ur character move an extra 5 units or sumthin? like +15 or like that??

scotch

What are you talking about? the character goes wherever you tell it to go..

Mr.Trant

no, on key press, like have the letter "d" make the character run amination loop 8 and while that happens, move character like 15 units along the x axis!

Mr.Trant

or make on key press letter "d", make the character switch animations and then move then switch back

scotch

#4
well when you want the character to move 15 along x then you put this line in your on key press function:

 if (keycode==68)  MoveCharacter(CHARID, (character[CHARID].x)+15, character[CHARID].y);

Mr.Trant

yeah, but i want it to do a certain animation while it moves???

scotch

#6
Mr Trant, while I am going to tell you because I'm too helpful I suggest you work on a simple point and click game with no complicated idea that AGS doesn't really do by default if you can't even be bothered to work out/look up in the manual simple thins like this.

Anyway, just change the line to

if (keycode==68)  {MoveCharacter(CHARID, (character[CHARID].x)+15, character[CHARID].y); AnimateCharacter(CHARID,LOOP, SPEED, 0);}

Mr.Trant

that didnt work, all it does is run the animation, not moving the char.

see, im trying to make the char jump to the right, i ve tried everything, but it either moves w/ the wrong animation or ir does the animation w/o moving!!! idk to do!!!

SMF spam blocked by CleanTalk