Klein~
TH.net Regular
- Reaction score
- 0
I was doubt how can I make a casting unit dependance custom skill and give it to more than 2 units.
I know it may not be well explained, but here I go:
Let's say I have a skill that set a variable for casting unit and I have another trigger that picks this variable unit and do the actions.
If I cast this skill with one unit, this will be normal, but if two units cast this same skill, the variable won't be set for the first to cast.
You'll tell me to add the casting unit to a group and pick the units into this group and do the actions, ok I know it, but the goal of this thread is other.
I want to set a variable for each caster and I want to run the same trigger with every caster separated.
I don't have any idea of how to collect the number of times that the trigger runned or the identification for each diferent unit that triggers.
To be more specific, I'll give a example of this kind of trouble. Let's say a skill that starts a timer(not only timer, can be a variable++) for every unit and time it is cast:
0 second game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 1st cast = 0 second.
1 second game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 2nd cast = 0 second.
Time of 1st cast updated = 1 second.
2 seconds game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 3rd cast = 0 second.
Time of 2nd cast updated = 1 second.
Time of 1st cast updated = 2 second.
3 seconds game time:
Time of 3rd cast updated = 1 second.
Time of 2nd cast updated = 2 second.
Time of 1st cast updated = 3 second.
I know it may not be well explained, but here I go:
Let's say I have a skill that set a variable for casting unit and I have another trigger that picks this variable unit and do the actions.
If I cast this skill with one unit, this will be normal, but if two units cast this same skill, the variable won't be set for the first to cast.
You'll tell me to add the casting unit to a group and pick the units into this group and do the actions, ok I know it, but the goal of this thread is other.
I want to set a variable for each caster and I want to run the same trigger with every caster separated.
I don't have any idea of how to collect the number of times that the trigger runned or the identification for each diferent unit that triggers.
To be more specific, I'll give a example of this kind of trouble. Let's say a skill that starts a timer(not only timer, can be a variable++) for every unit and time it is cast:
0 second game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 1st cast = 0 second.
1 second game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 2nd cast = 0 second.
Time of 1st cast updated = 1 second.
2 seconds game time:
Unit A -> cast Skill -> trigger save time.
Initial time for 3rd cast = 0 second.
Time of 2nd cast updated = 1 second.
Time of 1st cast updated = 2 second.
3 seconds game time:
Time of 3rd cast updated = 1 second.
Time of 2nd cast updated = 2 second.
Time of 1st cast updated = 3 second.