Character fall

Started by kafka, Thu 12/01/2006 13:35:13

Previous topic - Next topic

kafka

How can I make my character fall from the top of the room?

Khris

If you intend to do this in a cutscene, use something like this:

Code: ags
int c=0;
while (c<230) {
Ã,  cRoger.z=c;Ã,  Ã,  Ã,  // Characters z-coord represents height
Ã,  Wait(1);Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // without this line, movement would happen in an instant
Ã,  c++;
}

kafka


Khris

I've just noticed that my code makes the character rise...
change it to
Code: ags
int c=cRoger.y;
while (c>0) {
Ã,  cRoger.z=c;
Ã,  Wait(1);
Ã,  c--;
}

kafka

Heh. I noticed that and I changed the code that it falls. :)

SMF spam blocked by CleanTalk