[Fixed for V0.45] Toggling movable/fake/invisible walls
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
[Fixed for V0.45] Toggling movable/fake/invisible walls
When you put a movable and fake, movable and invisible, or fake and invisible wall on the same square with one active and the other not and try to toggle the two it does not work properly. If the wall that is active is the one that is higher in the room list is the active one, it does not activate initially. The two do not exchange states properly in response to the toggle either. When the bottom one is active initially, it starts okay, but does not toggle correctly. There can also be problems when you combine, say, a movable wall and a pit on the same square. In such a case the pit works as expected but the wall doesn't. Other cases I have tried (not using wall types), such as "on" and "off" electric floors, seem to switch as expected.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Re: Toggling movable/fake/invisible walls not as expected
I strongly suspect what is happening is that an internal flag stating if the tile is passable or not is being set by the last thing that happened on the tile.clem wrote:When you put a movable and fake, movable and invisible, or fake and invisible wall on the same square with one active and the other not and try to toggle the two it does not work properly. If the wall that is active is the one that is higher in the room list is the active one, it does not activate initially. The two do not exchange states properly in response to the toggle either. When the bottom one is active initially, it starts okay, but does not toggle correctly.
For example, if you had two movable walls one active and the other inactive on the same tile. What you would expect is that that tile would always be impassable both in its initial state and if you toggled both.
However, what I suspect is happening is that the "passability" of the tile is being set by the last action that is performed on the tile. The key point being that the two toggles don't happen simultaneously; they happen in a specific order, one then the other.
For example, if you first change the active one to inactive that makes the tile passable, but then change the originally inactive one to active that makes the tile impassable again. The tile ends up impassable which is correct.
However, if you first change the inactive one to active that makes the tile impassable, but then change the originally active one to inactive that makes the tile passable. The tile ends up passable which is incorrect.
Clearly the engine should evaluate the passability of a tile based on the entire contents of the tile though, not just the last thing that was changed on it!
I've split this issue off into a separate thread.clem wrote:There can also be problems when you combine, say, a movable wall and a pit on the same square. In such a case the pit works as expected but the wall doesn't. Other cases I have tried (not using wall types), such as "on" and "off" electric floors, seem to switch as expected.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact: