Hi :)
I'm currently scripting various objects in my map, including a large curtain set up in three different parts. When you interact with any of the three parts, the central part plays an empty frame, and the two side parts play frames with folded versions of the curtain, so it gives the illusion of a double curtain which opens in the middle. The script also changes the navigation paths under the central part to allow the player's passage. It works fine, I can open and close the curtain and go through when it's open, but some adjacent tiles behave strangely. For some reason, while the player can follow a straight line through the central curtain part, he can't go on several adjacent tiles, but nothing in the script is supposed to change their navigation path.
Here's the script:
if global.property["curtain_1_open"] == false then play_animation(entity["curtain_1c"], "empty"); play_animation(entity["curtain_1l"], "open"); play_animation(entity["curtain_1r"], "open"); modify_navigation("g_curtain_1s", "g_curtain_1c", 0); modify_navigation("g_curtain_1c", "g_curtain_1n", 0); set_global_property("curtain_1_open", true) else play_animation(entity["curtain_1c"], "closed"); play_animation(entity["curtain_1l"], "closed"); play_animation(entity["curtain_1r"], "closed"); modify_navigation("g_curtain_1s", "g_curtain_1c", 2); modify_navigation("g_curtain_1c", "g_curtain_1n", 2); set_global_property("curtain_1_open", false) end
I'll post an animated a bit later so it should make more sense. But basically, the problem is some tiles become non-walkable for no apparent reason (but they get walkable again if the curtain is closed).