Sorry, we don't support your browser.  Install a modern browser
This post is closed.

onObject[Enter/Leave]ScriptingZone scripts triggering multiple times in a row incorrectly#176

My function onObjectLeaveScriptingZone(zone, obj) are triggering on load and once loaded and triggered properly will trigger at least 3 times.

Here is the mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=2092091239

Press the buttons on the setup & difficulty board to see the triggers go haywire.

3 years ago

Additional observation: Just clicking on a card will trigger the script, for example using the vector gizmo (which doesn’t even move the card) will trigger it’s script.

3 years ago

I think one part of the bug is that when the card ENTERS the scripting zone and becomes part of the deck there it is DESTROYED, which makes the game think it LEFT the zone, thereby triggering the script. Which is obviously not the intended behaviour.

3 years ago

I’m experiencing the same issue.
Example script:

function onObjectLeaveScriptingZone(zone, object)
if zone.getGUID() == ‘096e86’ then
print(object.getName())
end
end

Place a deck with named cards and remove them one by one from the deck and script zones.
At first it would behave normally.
Upon removing the penultimate card from the deck (not the zone) the name of the deck will be announced followed by the last card in the deck and the last card in the deck again.
Joining the last card and the penultimate card announces each of the two cards, followed by the empty name of the new deck.

3 years ago
Changed the status to
In Progress
3 years ago
Changed the title from "onObjectLeaveScriptingZone scripts trigger on load" to "onObject[Enter/Leave]ScriptingZone scripts triggering multiple times in a row incorrectly"
3 years ago
Changed the status to
Completed
3 years ago