I would like for it to wait 20 sec and then walk again but if I add Wait(20); it then turns in to a blocking move and I don't want that .
// script for room: Repeatedly execute
if (character[LADYTALL].walking == 0) { //if not walking
MoveCharacterPath (LADYTALL, 183, 98);
MoveCharacterPath (LADYTALL, 123, 83);
}
So how can I make it stand for 20 then walk again ?
//outside the functions
int state = 0;
// script for room: Repeatedly execute
if (character[LADYTALL].walking == 0) { //if not walking
if (state == 0) MoveCharacterPath (LADYTALL, 183, 98);
if (state == 21) MoveCharacterPath (LADYTALL, 123, 83);
state ++;
}
That seems to work a little . it walks to the right then to the left and stops . and I have it in the repeatexecute ?
Did you want her to repeat and repeat, so she's going and going and going?
Try this then:
//outside the functions
int state = 0;
// script for room: Repeatedly execute
if (character[LADYTALL].walking == 0) { //if not walking
if (state == 0) {
MoveCharacterPath (LADYTALL, 183, 98);
MoveCharacterPath (LADYTALL, 123, 83);
}
state ++;
if (state == 800) state=0; //20 secs=800 loops
}
Thank you that work fine ..