script "forceMoveRoute" "skippable parameter

Hello All,

I am having troble with a script in MV.
In a Map, I have a flying character and I want each of the other caracters to move right or left if they are beneath the first one.

so I put this script to move the event :

var moveRoute ={"list":[{code:2,parameters:[]}],repeat:false,skippable:true,wait:false};
$gameMap.event(persos).forceMoveRoute(moveRoute);

My problem is that the events move even if the tile on the left is non walkable.

Is there a solution to have the"skippable" parameter work ?

Many thanks
I'm not sure what persos[i] is, but the rest of your script call looks OK! 👋

skippable: true tells the character to skip to the next move command if their movement was blocked. What you describe is something different: the characters are not being blocked when they should be.

Since the characters are "flying", I guess you have Through enabled? This setting makes a character ignore all collisions, so it would explain what you are seeing.

Otherwise it may be plugin-related. You could try turning off all your plugins (Ctrl+A -> right-click -> Turn OFF) to see if that helps.
Thanks caethyril !
It works now. As you said I had a bug in the map enabling stepping on a tile that should'nt have been walkable.

As for "persos", I have a loop on all the npc's on a map to check if they are currently under te specified event.
So I declared an object whith the npc's (persos as short for "personnages" wich is "caracters" in French) and then use the loop "for...in".

Thanks again I was going mad over this !

Original thread: https://forums.rpgmakerweb.com/threads/script-forcemoveroute-skippable-parameter.140129/