Thank you so much, Matti. I tried your code and it works. I also want to thank you, Khris, as you did give me a better understanding of coding for other parts of my game. Thanks, everyone.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
if (cLibrarian.Moving || cLibrarian.Animating) {
return;
}
if (TimerStart == true) {
location = Random(0); // Randomize 9 numbers
TimerStart = false; // Stop timer from randomizing
Walked = false;
return;
}
if (location == 0) {
if (cLibrarian.x == 444 && cLibrarian.y == 229) {
Walked = true;
cLibrarian.FaceDirection(eDirectionRight);
cLibrarian.LockView(39);
cLibrarian.Animate(2, 5, eOnce, eNoBlock, eForwards);
return;
}
if (!Walked) {
cLibrarian.Walk(444, 229, eNoBlock, eWalkableAreas);
return;
}
}
cLibrarian.UnlockView();
Walked = false;
TimerStart = true;
if (TimerStart == true) {
location = Random(0); // Randomize 9 numbers
TimerStart = false; // Stop timer from randomizing
}
if (TimerStart == false) { // If timer is paused then send librarian to location
if (cLibrarian.Moving) {
// If librarian is moving do nothing
} else {
if (location == 0) {
if (Walked == false) {
cLibrarian.Walk(444, 229, eNoBlock, eWalkableAreas);
}
if (cLibrarian.Moving == true) {
return;
} else {
Walked = true;
cLibrarian.FaceDirection(eDirectionRight);
cLibrarian.LockView(39);
cLibrarian.Animate(2, 5, eOnce, eNoBlock, eForwards);
if (cLibrarian.Animating == true) {
return;
} else {
cLibrarian.UnlockView();
Walked = false;
TimerStart = true;
}
}
}
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.024 seconds with 13 queries.