Ok I have a small problem with my game. At one point you have to get past a ghost by playing a little game with him. He turns away from you and only then you may walk...if you walk when he faces you he will notice that you're moving and you have to restart. That thing works but i can't figure out how to solve it when the character isn't moving. here's the code i've got so far
(The timer starts from the global script after a dialog has ended where you choose if you want to play the game with him or not)
function room_RepExec()
{
if (IsTimerExpired(1))
while (cEgo.Moving) {
cChar27.FaceLocation(cChar27.x + 10, cChar27.y);
cEgo.StopMoving();
cChar27.Say ("Hah you're moving");
cChar27.Say ("You have to start over");
dGhost2.Start();
}
The part below doesn't work at all and I've probably just overlooked something
else if (IsTimerExpired(1)) {
// on this line I guess i want a code like "If character is not moving" kind of thing
cChar27.FaceLocation(cChar27.x + 10, cChar27.y);
cChar27.Say ("You're good. Let's continue");
(here i'd like to set a different timer so the intervals between the ghost won't be exactly the same. the first timer from the global script is 400 so the second could be 300 then 100 and maybe a last one at 200)
}
}
Hope anyone can help
(The timer starts from the global script after a dialog has ended where you choose if you want to play the game with him or not)
function room_RepExec()
{
if (IsTimerExpired(1))
while (cEgo.Moving) {
cChar27.FaceLocation(cChar27.x + 10, cChar27.y);
cEgo.StopMoving();
cChar27.Say ("Hah you're moving");
cChar27.Say ("You have to start over");
dGhost2.Start();
}
The part below doesn't work at all and I've probably just overlooked something
else if (IsTimerExpired(1)) {
// on this line I guess i want a code like "If character is not moving" kind of thing
cChar27.FaceLocation(cChar27.x + 10, cChar27.y);
cChar27.Say ("You're good. Let's continue");
(here i'd like to set a different timer so the intervals between the ghost won't be exactly the same. the first timer from the global script is 400 so the second could be 300 then 100 and maybe a last one at 200)
}
}
Hope anyone can help
