• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Triggered Hero´s Attribute Modifier

Status
Not open for further replies.
Level 5
Joined
Feb 18, 2016
Messages
96
I was doing a trigger that modify a hero´s attribute by adding 100% of the attribute of an enemy hero when its killed by the first hero. When the hero kills another enemy it loses the previous attribute bonus and gains a different, always depending of what´s the attribute of the killed hero but it seems does not work and i cant find the problem

  • Atributo Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Dying unit) is A Hero) Equal to True
          • (Killing unit) Equal to Varia
    • Actions
      • Set AtributoHeroe = (Dying unit)
      • -------- Remove S --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Real(AtributoNumero[1])) Greater than 0.00
        • Then - Actions
          • Hero - Modify Strength of Varia: Subtract AtributoNumero[1]
        • Else - Actions
          • Do nothing
      • -------- Remove A --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Real(AtributoNumero[2])) Greater than 0.00
        • Then - Actions
          • Hero - Modify Agility of Varia: Subtract AtributoNumero[2]
        • Else - Actions
          • Do nothing
      • -------- Remove I --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Real(AtributoNumero[3])) Greater than 0.00
        • Then - Actions
          • Hero - Modify Intelligence of Varia: Subtract AtributoNumero[3]
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Real((Strength of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Intelligence of AtributoHeroe (Include bonuses))))
              • (Real((Strength of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Agility of AtributoHeroe (Include bonuses))))
        • Then - Actions
          • Set AtributoNumero[1] = (Strength of (Dying unit) (Include bonuses))
          • Set AtributoNumero[2] = 0
          • Set AtributoNumero[3] = 0
          • Hero - Modify Strength of Varia: Add AtributoNumero[1]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Real((Agility of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Intelligence of AtributoHeroe (Include bonuses))))
                  • (Real((Agility of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Strength of AtributoHeroe (Include bonuses))))
            • Then - Actions
              • Set AtributoNumero[2] = (Strength of (Dying unit) (Include bonuses))
              • Set AtributoNumero[1] = 0
              • Set AtributoNumero[3] = 0
              • Hero - Modify Agility of Varia: Add AtributoNumero[2]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Real((Intelligence of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Strength of AtributoHeroe (Include bonuses))))
                      • (Real((Intelligence of AtributoHeroe (Include bonuses)))) Greater than or equal to (Real((Agility of AtributoHeroe (Include bonuses))))
                • Then - Actions
                  • Set AtributoNumero[3] = (Strength of (Dying unit) (Include bonuses))
                  • Set AtributoNumero[1] = 0
                  • Set AtributoNumero[2] = 0
                  • Hero - Modify Intelligence of Varia: Add AtributoNumero[3]
                • Else - Actions
                  • Do nothing
Also sorry for my bad english
 
Last edited:
No problem, was just notifying. :)

Can you ensure conditions are met? Display a message on screen to see if something runs or not so you can debug it.

Some not needed things:

- Remove "Do Nothing" Action. It does nothing senseful.
- Don't use "And - All Condtions are True". Simply add conditions and they will be linked with a logical "and" by default.
- Don't convert all your values to "Real". Directly make a integer comparison to check for numbers.

Thit should do a bit. :) Just post again if problems remain.
 
Level 5
Joined
Feb 18, 2016
Messages
96
No problem, was just notifying. :)

Can you ensure conditions are met? Display a message on screen to see if something runs or not so you can debug it.

Some not needed things:

- Remove "Do Nothing" Action. It does nothing senseful.
- Don't use "And - All Condtions are True". Simply add conditions and they will be linked with a logical "and" by default.
- Don't convert all your values to "Real". Directly make a integer comparison to check for numbers.

Thit should do a bit. :) Just post again if problems remain.


Did all 3 thing but it still does not work. But then i thinked and i found the problem and i cant solve it. For some reason the ability "mirror image" that the hero has, deletes the variable when cast. Thanks for the replys by the way
 
Last edited:
Status
Not open for further replies.
Top