How to pause by script?

id anyone have  any idea how to make a pause in script, we can by menu but did't find out by script.


Also did you know how many frame take one player to move 1 tile?
id anyone have  any idea how to make a pause in script, we can by menu but did't find out by script.


Also did you know how many frame take one player to move 1 tile?



http://stackoverflow.com/questions/3583724/how-do-i-add-a-delay-in-a-javascript-loop
Already read this page in the past and try it. Did't work for unknow reason.


They must have an equivalent of the wait fonction in menu.
Already read this page in the past and try it. Did't work for unknow reason.


They must have an equivalent of the wait fonction in menu.

You can try   this.wait(60) 


Example 


$gameScreen.tintPicture(3, [220,220,220,0], 20) ;
this.wait(60) ;


Am not shure if is this you need , but is work
thnks that work. It's not perfect but work. By the way when we use event and move player we can tell to wait then end for execution on the next code.


How do this in code, it's my main concern. .moveForward(); work but never wait.


After some test don't work finnaly for unknow reason it's still loop and never wait:

Code:
e=$gamePlayer; t=$gameMap.terrainTag(e.x,e.y);
p=e.isMapPassable(e.x, e.y, e.direction());
while (p && (t === 1 || t === 2 || t === 3 || t === 4 || t === 5)){
if(e.ismoving){alert(1);}
if (t !== 5){e.setDirection(t*2);}
e.moveForward();
this.wait(60) ;
p=e.canPass(e.x, e.y, e.direction());
if(p){t=$gameMap.terrainTag(e.x,e.y);}else{t=6}
}
thnks that work. It's not perfect but work. By the way when we use event and move player we can tell to wait then end for execution on the next code.


How do this in code, it's my main concern. .moveForward(); work but never wait.

is not possible to make a (wait) in java .


Java is like a motor.


When motor turn, you are not able to make it stop.


I search in Java, what you search, it's unfortunate logic.
I will also like to do that, there are complex but very bad solution and they will take lot of code en memory.
I think me problem coming from the fact that it's call by a parallele process....
I think me problem coming from the fact that it's call by a parallele process....

Make a video, if possible , will be more able to help you
Ok I got a video for you with the latest code.


e=$gamePlayer; t=$gameMap.terrainTag(e.x,e.y);
p=e.canPass(e.x, e.y, e.direction());
if (p){
while (t === 1 || t === 2 || t === 3 || t === 4 || t === 5){
if (t !== 5){e.setDirection(t*2);}
p=e.canPass(e.x, e.y, e.direction());
if(p){
e.moveForward();
t=$gameMap.terrainTag(e.x,e.y);}else{t=6}
}}



View attachment Screen 07-02-2016 22-09-27.avi

Sans tivqqwqwqwqwtre.png
lastest version of my code...


e=$gamePlayer; t=$gameMap.terrainTag(e.x,e.y);
if (t > 0 && t < 5){e.setDirection(t*2);}
while (e.canPass(e.x, e.y, e.direction()) && (t > 0 && t < 6)){
$gamePlayer.moveForward();
t=$gameMap.terrainTag(e.x,e.y);
if (t > 0 && t < 5){e.setDirection(t*2);}}


This version solve the trouble about passabilité when entering a arrow from the side and the other side is not passable.


But the main trouble still, it's alway go to the end of the path like show the video.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-pause-by-script.64541/