How do I call the unit for whom the attribute changes in this event?
Unit - Any Unit attribute points changed
Triggering unit does not work. I need to use it to set the "Triggering Attribute Point" to a global integer variable for the owner of the unit.
My map has 1 single hero for each player, and when the hero gains items/levels up, the attributes change, which needs to change the catalog field value for some effects.
I'm almost certain that "triggering unit" works correctly for this function. Are you 100% sure it isn't working?
There's a problem with the attribute trigger, too. Let's say I have an item that adds +8 Strength. The trigger will run 8 times, once for each increment. Obviously inefficient. If all you have is attributes via leveling and item gain, then you could use the "gains experience level" and "gains/loses an item" events. These will work properly (I use a similar system myself) and have the added bonus of definitely functioning correctly when it comes to finding the triggering unit!
Hm, well I tried it before and it gave me an error saying there were no triggering unit - I'll try it again just to make sure.
Also, I'm using behaviors to increase stats - for instance - adding 4 stacks of "Increase Attack Damage". The reason I'm using "Unit - Any Unit attribute points changed" is to be able to get the actual amount of attributes as I use the amount to set the damage and values of abilities.
Also, I'm using behaviors to increase stats - for instance - adding 4 stacks of "Increase Attack Damage". The reason I'm using "Unit - Any Unit attribute points changed" is to be able to get the actual amount of attributes as I use the amount to set the damage and values of abilities.
I thought getting the amount of attribute points a unit has was as simple as getting the stack of the attribute behaviour? I know it is kind of illogical but the attribute behaviour stacks reflect the number of attribute points a unit has and I would imagine it includes any modifications made by other behaviours.
How do I call the unit for whom the attribute changes in this event?
Unit - Any Unit attribute points changed
Triggering unit does not work. I need to use it to set the "Triggering Attribute Point" to a global integer variable for the owner of the unit.
My map has 1 single hero for each player, and when the hero gains items/levels up, the attributes change, which needs to change the catalog field value for some effects.
For each hero unit run a check
For each integer slot from 1 to number of behaviors increment 1
If
((Hero) behavior Slot) == (Triggering behavior)
Then
Set Triggering Unit = Hero
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
I'm almost certain that "triggering unit" works correctly for this function. Are you 100% sure it isn't working?
There's a problem with the attribute trigger, too. Let's say I have an item that adds +8 Strength. The trigger will run 8 times, once for each increment. Obviously inefficient. If all you have is attributes via leveling and item gain, then you could use the "gains experience level" and "gains/loses an item" events. These will work properly (I use a similar system myself) and have the added bonus of definitely functioning correctly when it comes to finding the triggering unit!
@willuwontu: Go
Will try it out with individual actions for each unit for the player.
@TyaArcade: Go
Hm, well I tried it before and it gave me an error saying there were no triggering unit - I'll try it again just to make sure.
Also, I'm using behaviors to increase stats - for instance - adding 4 stacks of "Increase Attack Damage". The reason I'm using "Unit - Any Unit attribute points changed" is to be able to get the actual amount of attributes as I use the amount to set the damage and values of abilities.
I thought getting the amount of attribute points a unit has was as simple as getting the stack of the attribute behaviour? I know it is kind of illogical but the attribute behaviour stacks reflect the number of attribute points a unit has and I would imagine it includes any modifications made by other behaviours.
I tested the triggering unit again, and for some reason it works now o.o
I have no idea why it didnt work the first time. But I might use your suggestion if I find it causing lag, ImperialGood