• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

help with gaining strength over time passive ability

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
hey all I need help with the above ability basically the hero with the growth ability will be given a tome of strength every minute which increases its strength by the set value in the OB data the tome also has 100 levels which all works how ever I want to make it so when the growth ability's level is increased to 2 and 3 the strength bonus every minute is increased to 2/3 I've made the other tome items I just don't know how to trigger it to use the level 2 and 3 tomes instead of the level 1 version when growth is upgraded to the respective level, not sure If I explained this well so sorry if I did not

  • Growth Copy
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set temp_group = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cff008000Treant Warrior|r) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in temp_group and do (Actions)
        • Loop - Actions
          • Set ability_level = ((Custom value of (Picked unit)) + 1)
          • Unit - Add Growthstrengthincrease1 to (Picked unit)
          • Unit - Set level of Growthstrengthincrease1 for (Picked unit) to ability_level
          • Unit - Remove Growthstrengthincrease1 from (Picked unit)
          • Unit - Set the custom value of (Picked unit) to ability_level
      • Custom script: call DestroyGroup(udg_temp_group)
btw Growthstrengthincrease1 is the level 1 tome ability
 
Level 5
Joined
May 12, 2014
Messages
133
I'm not sure how tome abilities work, so I can't say whether or not it's a good idea to use it like that. But if you want to increase the strength of the hero every minute, then an easier trigger could be used to adjust his strength however the heck you want.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_UGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cff008000Treant Warrior|r) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_UGroup and do (Actions)
        • Loop - Actions
          • -------- You can add any amount of strength here, it doesn't have to be just 1 --------
          • Hero - Modify Strength of (Picked unit): Add 1
          • -------- ------------------------------------------------------------------------------------------------------ --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup (udg_Temp_UGroup)
The advantage to this is that there is no object editor work aside from the dummy spell itself. This changes the white number of the hero's strength though, but since you're trying to use tomes anyway, I think that's the goal.
 
Level 9
Joined
Jun 10, 2013
Messages
473
I'm not sure how tome abilities work, so I can't say whether or not it's a good idea to use it like that. But if you want to increase the strength of the hero every minute, then an easier trigger could be used to adjust his strength however the heck you want.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_UGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cff008000Treant Warrior|r) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_UGroup and do (Actions)
        • Loop - Actions
          • -------- You can add any amount of strength here, it doesn't have to be just 1 --------
          • Hero - Modify Strength of (Picked unit): Add 1
          • -------- ------------------------------------------------------------------------------------------------------ --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup (udg_Temp_UGroup)
The advantage to this is that there is no object editor work aside from the dummy spell itself. This changes the white number of the hero's strength though, but since you're trying to use tomes anyway, I think that's the goal.

Thanks! That looks and sounds much better however could you show how to make the strength add increase from 1 to 2 and 3 based on the dummy abilities level?
 
Level 5
Joined
May 12, 2014
Messages
133
Do you mean like the hero would gain 1 strength after a minute, and then 2 str after another minute, 3 str after another minute, etc.

Or like
Level 1 - 1 str per minute
Level 2 - 2 str per minute
Level 3 - 3 str per minute

The first case is easy if the spell doesn't need to be MUI.
This would grant a total of 1 str after 1 minute, 3 str after 2 minutes, 6 str after 3 minutes, etc.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Growth_Value = (Growth_Value + 1)
      • Hero - Modify Strength of Treant_Warrior: Add Growth_Value
      • Special Effect - Create a special effect attached to the origin of Treant_Warrior using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
Though if you need it this way AND MUI, then I would probably remake the trigger using some indexing. Something like this.
  • Growth Learned
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Growth
    • Actions
      • Set Growth_Loop_Max = (Growth_Loop_Max + 1)
      • Set Growth_C[Growth_Loop_Max] = (Triggering unit)
      • Set Growth_Timer[Growth_Loop_Max] = 60.00
      • Set Growth_Value[Growth_Loop_Max] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Growth_Loop_Max Equal to 1
        • Then - Actions
          • Trigger - Turn on Growth Loop <gen>
        • Else - Actions
  • Growth Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Growth_Loop) from 1 to Growth_Loop_Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Growth_C[Growth_Loop] is alive) Equal to True
            • Then - Actions
              • Set Growth_Timer[Growth_Loop] = (Growth_Timer[Growth_Loop] - 1.00)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Growth_Timer[Growth_Loop] Less than or equal to 0.00
                • Then - Actions
                  • Set Growth_Timer[Growth_Loop] = 60.00
                  • Set Growth_Value[Growth_Loop] = (Growth_Value[Growth_Loop] + 1)
                  • Hero - Modify Strength of Growth_C[Growth_Loop]: Add Growth_Value[Growth_Loop]
                  • Special Effect - Create a special effect attached to the origin of Growth_C[Growth_Loop] using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
            • Else - Actions
If what you need is the gain strength equal to skill level thing, then that's the easiest thing and only needs 1 change from the very 1st trigger I showed.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_UGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cff008000Treant Warrior|r) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_UGroup and do (Actions)
        • Loop - Actions
          • -------- You can add any amount of strength here, it doesn't have to be just 1 --------
          • Hero - Modify Strength of (Picked unit): Add (1 x (Level of Growth for (Picked unit)))
          • -------- ------------------------------------------------------------------------------------------------------ --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup (udg_Temp_UGroup)
Note that I did 1 x Level of Growth. If it only actually scaled this way, you could just use Level of Ability. I just put the 1 x there just in case it was like "gain 6 strength per minute" at level 3.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Do you mean like the hero would gain 1 strength after a minute, and then 2 str after another minute, 3 str after another minute, etc.

Or like
Level 1 - 1 str per minute
Level 2 - 2 str per minute
Level 3 - 3 str per minute

The first case is easy if the spell doesn't need to be MUI.
This would grant a total of 1 str after 1 minute, 3 str after 2 minutes, 6 str after 3 minutes, etc.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Growth_Value = (Growth_Value + 1)
      • Hero - Modify Strength of Treant_Warrior: Add Growth_Value
      • Special Effect - Create a special effect attached to the origin of Treant_Warrior using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
Though if you need it this way AND MUI, then I would probably remake the trigger using some indexing. Something like this.
  • Growth Learned
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Growth
    • Actions
      • Set Growth_Loop_Max = (Growth_Loop_Max + 1)
      • Set Growth_C[Growth_Loop_Max] = (Triggering unit)
      • Set Growth_Timer[Growth_Loop_Max] = 60.00
      • Set Growth_Value[Growth_Loop_Max] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Growth_Loop_Max Equal to 1
        • Then - Actions
          • Trigger - Turn on Growth Loop <gen>
        • Else - Actions
  • Growth Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Growth_Loop) from 1 to Growth_Loop_Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Growth_C[Growth_Loop] is alive) Equal to True
            • Then - Actions
              • Set Growth_Timer[Growth_Loop] = (Growth_Timer[Growth_Loop] - 1.00)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Growth_Timer[Growth_Loop] Less than or equal to 0.00
                • Then - Actions
                  • Set Growth_Timer[Growth_Loop] = 60.00
                  • Set Growth_Value[Growth_Loop] = (Growth_Value[Growth_Loop] + 1)
                  • Hero - Modify Strength of Growth_C[Growth_Loop]: Add Growth_Value[Growth_Loop]
                  • Special Effect - Create a special effect attached to the origin of Growth_C[Growth_Loop] using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
            • Else - Actions
If what you need is the gain strength equal to skill level thing, then that's the easiest thing and only needs 1 change from the very 1st trigger I showed.
  • Increase Strength
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_UGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cff008000Treant Warrior|r) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Temp_UGroup and do (Actions)
        • Loop - Actions
          • -------- You can add any amount of strength here, it doesn't have to be just 1 --------
          • Hero - Modify Strength of (Picked unit): Add (1 x (Level of Growth for (Picked unit)))
          • -------- ------------------------------------------------------------------------------------------------------ --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup (udg_Temp_UGroup)
Note that I did 1 x Level of Growth. If it only actually scaled this way, you could just use Level of Ability. I just put the 1 x there just in case it was like "gain 6 strength per minute" at level 3.

The second one so thank you ! :goblin_yeah:

Or like
Level 1 - 1 str per minute
Level 2 - 2 str per minute
Level 3 - 3 str per minute
 
Status
Not open for further replies.
Top