Object has an action issue

I wanted to create the typical experience mechanism for a hero where the condition is “object has an action (attack)” and the effect is “change variable Exp by 1” in loop.
This always work when it’s a scenario where the hero needs to survive but how to make it work when the hero can die and return but it’s technically not anymore the unit you selected for the attack condition.
I thought you could simply set the generic unit type but no you need a specific unit to work and when that unit dies it doesn’t work anymore.

Use the Modify Attribute effect to tweak the unit’s stats instead of the “Change Object xxxx” effect. Modify Attribute always keep track of the modified stats, IDs etc, and do not cause the Objects to be unaffected by technologies and the like.
So if you make the unit gain say, 1 attack every level of XP, you’d use Modifiy Attribute => Attack (Add 1) and specify the type of attack: 4 is melee, 3 is ranged (same for Armour, 4 is base melee, 3 is base pierce).

1 Like

The issue here is that the unit that I set for the “object has an action” condition can die (she’s an heroine respawning) and once she’s dead I can’t set her unit as a condition because it’s not yet present in the scenario editor. Don’t know if it’s clear, it’s a bit hard to explain.
In short I can’t use the “object has an action” if not for a specific unit to gain experience, not for a type of units.

The modify attribute works fine, no problems with that.

Ah yes I see, the Object Has Action condition forces to select an object (which is a bit restrictive indeed).

In that case I don’t think there’s any way currently to pull this off, unfortunately.

1 Like

I wish they could make the trigger work even without selecting a specific object, also because you can select a type of unit (at first I thought it was enough indeed!)

Yes, I’m not sure if this is intented for this effect to force you to select a specific object, or if that’s just the game’s limitation.

1 Like

One last thing! I can’t change the unit visibility properly through the specific modify attribute. If I set it to 1 the unit is only visible through the fog but not when it moves in the unexplored black zone.
What I’d like to do is to make that specific type of enemy units to be visible like they’re yours, so through the fog and even exploring if they walk in the black.
I hope that was clear, thank you really for all the help, I won’t bother you again for a while!

You could possibly try setting the attribute to 2, for visible if alive. I’m not sure it’ll be any different, but it could help potentially.

1 Like

Thanks I’ll let you know!

After testing: if you put value 0 visibility is normal.
If you put 3 it becomes invisible but your units attack it if it’s in “sight”.
If you put 1, 2 or 4 it’s visible only through the fog but not as if it’s your unit.

So it’s either a bug or I’m doing something wrong. If someone else can test it we could know.

Why not read this article?

1 Like