Completed - Resolved

[Map Editor] Inhibitor scripting is... maybe dodgy?

woudo 5 years ago updated by Lee "Noontide" Moon (Designer & Community Manager) 5 years ago 7

This one is not as straight forward as the others and may entirely be user error; so here's the story.

I have multiple inhibitors in the level all with their own objective listed in the top-right. I'm trying to cull an objective when the associated Inhibitor is destroyed.

At first, I used (Trigger: On Block Changed) to check when the Inhibitor is destroyed, but it threw a scripting error at me, claiming "Some IDs don't exist anymore". I removed all the inhibitors on the map and rebuilt just one. Same problem.

While I was looking for alternative solutions, I realized Inhibitors (and presumably all shrines), cannot change block type, and when destroyed they revert to Neutral owned. So I changed the script to look at (Trigger: On Faction Changed) and have it watch for when the inhibitor turns Neutral. It didn't throw out the ID issue like before, which was nice, but it also didn't update the objective.

Any direction on the matter would be appreciated.

Game Version:
Steam Public

This "Some IDs don't exist anymore" issue seems to affect all 3x3 "shrines" and probably every script that tracks ID's. I had the same issue when I tried to use the "Revealer" action on a research shrine.

@woudo Use instead "On Health Changed" <= 0 targeting the Inhibitor; I can confirm this works.

As bzy mentioned, you should listen for health change, or On KO. As Inhibitors are attackable, they have health = )

Completed - Next Patch