Hi, so I'm using the following code to trigger +1 to the relevant variable when placing an item depending on what map you're on. It kind of works, except the first time you place the item it jumps the variable value from 0 to 6, and then weirdly it works perfectly after that, adding 1 each time. Can't work out why it's jumping to 6 first! Any help much appreciated!! <3
if ($gameMap.mapId() === 210) {
$gameVariables.setValue(102, $gameVariables.value(102) + 1);
} else if ($gameMap.mapId() === 122) {
$gameVariables.setValue(212, $gameVariables.value(212) + 1);
}
if ($gameMap.mapId() === 210) {
$gameVariables.setValue(102, $gameVariables.value(102) + 1);
} else if ($gameMap.mapId() === 122) {
$gameVariables.setValue(212, $gameVariables.value(212) + 1);
}