I'm working on my footmen war and I wanna have a trigger that detects the primary attribute of the killing hero and gives them +1 to that attribute. Does anyone know if this can be done in GUI or do I have to resort to Jass to get this done?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hmm, check this out
Unit - Entering Playable Area
Condition - Entering Unit is [Skeleton King]
Action
Set variable STR Attribute(Player numbers of owner of entering unit)] = 1
Then,
Unit - Dies
Condition - STR Attribute (Player numbers of owner of killing unit) = 1
Action
Add 1 Str to killing unit
hmm, check this out
Unit - Entering Playable Area
Condition - Entering Unit is [Skeleton King]
Action
Set variable STR Attribute(Player numbers of owner of entering unit)] = 1
Then,
Unit - Dies
Condition - STR Attribute (Player numbers of owner of killing unit) = 1
Action
Add 1 Str to killing unit
hmm, check this out
Unit - Entering Playable Area
Condition - Entering Unit is [Skeleton King]
Action
Set variable STR Attribute(Player numbers of owner of entering unit)] = 1
Then,
Unit - Dies
Condition - STR Attribute (Player numbers of owner of killing unit) = 1
Action
Add 1 Str to killing unit
Melee Initialization

Events


Unit - A unit enters (Playable map area)

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Strength of (Triggering unit) (Exclude bonuses)) Greater than (Agility of (Triggering unit) (Exclude bonuses))




Or - Any (Conditions) are true





Conditions






(Strength of (Triggering unit) (Exclude bonuses)) Greater than (Intelligence of (Triggering unit) (Exclude bonuses))



Then - Actions




Unit Group - Add (Triggering unit) to STR_GROUP



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Agility of (Triggering unit) (Exclude bonuses)) Greater than (Strength of (Triggering unit) (Exclude bonuses))






Or - Any (Conditions) are true







Conditions








(Agility of (Triggering unit) (Exclude bonuses)) Greater than (Intelligence of (Triggering unit) (Exclude bonuses))





Then - Actions






Unit Group - Add (Triggering unit) to AGI_GROUP





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Intelligence of (Triggering unit) (Exclude bonuses)) Greater than (Strength of (Triggering unit) (Exclude bonuses))








Or - Any (Conditions) are true









Conditions










(Intelligence of (Triggering unit) (Exclude bonuses)) Greater than (Agility of (Triggering unit) (Exclude bonuses))







Then - Actions








Unit Group - Add (Triggering unit) to INTEL_GROUP







Else - Actions
Untitled Trigger 001

Events


Unit - A unit Dies

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Killing unit) Equal to (Random unit from STR_GROUP)



Then - Actions




Hero - Modify Strength of (Triggering unit): Add 1



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Killing unit) Equal to (Random unit from AGI_GROUP)





Then - Actions






Hero - Modify Agility of (Triggering unit): Add 1





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Killing unit) Equal to (Random unit from INTEL_GROUP)







Then - Actions








Hero - Modify Intelligence of (Triggering unit): Add 1







Else - Actions
hmm, check this out
Unit - Entering Playable Area
Condition - Entering Unit is [Skeleton King]
Action
Set variable STR Attribute(Player numbers of owner of entering unit)] = 1
Then,
Unit - Dies
Condition - STR Attribute (Player numbers of owner of killing unit) = 1
Action
Add 1 Str to killing unit
Events

Unit - A unit Dies
Conditions
Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)


If - Conditions



(Strength of (Killing unit) (Exclude bonuses)) Greater than (Agility of (Killing unit) (Exclude bonuses))



(Strength of (Killing unit) (Exclude bonuses)) Greater than (Intelligence of (Killing unit) (Exclude bonuses))


Then - Actions



Hero - Modify Strength of (Killing unit): Add 1


Else - Actions



If (All Conditions are True) then do (Then Actions) else do (Else Actions)




If - Conditions





(Agility of (Killing unit) (Exclude bonuses)) Greater than (Strength of (Killing unit) (Exclude bonuses))





(Agility of (Killing unit) (Exclude bonuses)) Greater than (Intelligence of (Killing unit) (Exclude bonuses))




Then - Actions





Hero - Modify Agility of (Killing unit): Add 1




Else - Actions





Hero - Modify Intelligence of (Killing unit): Add 1
Yeah, you right, though I was thinking more along the lines of operator's trigger. Assuming that primary attribute was highest of all attributes, you could also use:
...of course, adding own conditions etc.
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Strength of (Killing unit) (Exclude bonuses)) Greater than (Agility of (Killing unit) (Exclude bonuses))
(Strength of (Killing unit) (Exclude bonuses)) Greater than (Intelligence of (Killing unit) (Exclude bonuses))
Then - Actions
Hero - Modify Strength of (Killing unit): Add 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Agility of (Killing unit) (Exclude bonuses)) Greater than (Strength of (Killing unit) (Exclude bonuses))
(Agility of (Killing unit) (Exclude bonuses)) Greater than (Intelligence of (Killing unit) (Exclude bonuses))
Then - Actions
Hero - Modify Agility of (Killing unit): Add 1
Else - Actions
Hero - Modify Intelligence of (Killing unit): Add 1
That would at least limit to one trigger...
This would not work if during some time in the gameplay the unit got a higher secondary attribute than his/her primary. Then the secondary attribute would go higher. My trigger doesn't take long. You just copy and paste most of the stuff and edit a bit, and it's done. Plus it's not buggy (I think) so it's overall better in the end.
