• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ability help

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
HELLO ALL >:D and good whatever your time of day is! I need help one creating the following ability

Strengthened Resolve:

The spider lord receives increased armor at a cost of reduced movement and attack speed. Lasts 35 seconds.

L1: -50% move speed, -15% attack speed and +10 armor.

L2: -75% move speed, -25% attack speed and +15 armor.

L1: -90% move speed, -30% attack speed and +20 armor.

Note: I've tried to use a system where the hero activates a berserk ability with negative values and then is given a spell book with a custom "Spiked Carapace" ability for the armor boost ( the armor boost would be applied based on the unit having the buff then removed once the buff is gone ) however this system gave me several errors such as the armor buff taking to long to be applied and the armor buff only working at level 1, Thus any help in solving this conundrum would by greatly appreciated by my amateur triggering self :D
 
Level 9
Joined
Jun 10, 2013
Messages
473
use the armor item ability?

but wouldn't that have the same problem leveling up? currently I've strewn this together but I doubt the way I've done it is very effective:

  • Strengthened Resolve
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup1 = (Units in (Playable map area))
      • Unit Group - Pick every unit in tempGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Strengthened Resolve 1) Equal to True
            • Then - Actions
              • Unit - Add Strengthened Resolve book to (Picked unit)
              • Player - Disable Strengthened Resolve book for (Owner of (Picked unit))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Strengthened Resolve 2) Equal to True
                • Then - Actions
                  • Unit - Add Strengthened Resolve book 2 to (Picked unit)
                  • Player - Disable Strengthened Resolve book 2 for (Owner of (Picked unit))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Strengthened Resolve 3) Equal to True
                    • Then - Actions
                      • Unit - Add Strengthened Resolve book 3 to (Picked unit)
                      • Player - Disable Strengthened Resolve book 3 for (Owner of (Picked unit))
                    • Else - Actions
      • Custom script: call DestroyGroup (udg_tempGroup1)
  • Strengthened Resolve Off
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup1 = (Units in (Playable map area))
      • Unit Group - Pick every unit in tempGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Strengthened Resolve 1) Equal to False
            • Then - Actions
              • Unit - Remove Strengthened Resolve book from (Picked unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Strengthened Resolve 2) Equal to False
                • Then - Actions
                  • Unit - Remove Strengthened Resolve book 2 from (Picked unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Strengthened Resolve 3) Equal to False
                    • Then - Actions
                      • Unit - Remove Strengthened Resolve book 3 from (Picked unit)
                    • Else - Actions
      • Custom script: call DestroyGroup (udg_tempGroup1)
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
What you have is really inefficient.
From the description you posted, it seems that this affects only the caster. The way you triggered it seems more like you were triggering an aura-type spell.

I'll assume the spell is for caster only.
Make a standard "unit starts the effect of..." type of trigger and check if the triggering spell is your spell. In actions, first add the armor item ability (of appropriate level) and add the caster into unit group (e.g. Resolve_Group).

Make second trigger that fires every second or so. In that trigger, pick every unit Resolve_Group and check if they have the buff. If they don't (or they're dead), remove them from unit group and remove the armor item ability.
 
Level 9
Joined
Jun 10, 2013
Messages
473
What you have is really inefficient.
From the description you posted, it seems that this affects only the caster. The way you triggered it seems more like you were triggering an aura-type spell.

I'll assume the spell is for caster only.
Make a standard "unit starts the effect of..." type of trigger and check if the triggering spell is your spell. In actions, first add the armor item ability (of appropriate level) and add the caster into unit group (e.g. Resolve_Group).

Make second trigger that fires every second or so. In that trigger, pick every unit Resolve_Group and check if they have the buff. If they don't (or they're dead), remove them from unit group and remove the armor item ability.

for the first trigger based on what you've said I've managed to do this:

  • Strengthened Resolve
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Strengthened Resolve
    • Actions
      • Set AbilityAdd = Strengthened Resolve Armor Boni
      • Set tempGroup1 = (Units of type Spiderlord)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in tempGroup1 and do (Actions)
        • Loop - Actions
          • Unit - Add AbilityAdd to (Picked unit)
          • Unit - Set level of AbilityAdd for (Picked unit) to (Level of Strengthened Resolve for (Triggering unit))
      • Custom script: call DestroyGroup (udg_tempGroup1)
as for the second trigger...
  • Strengthened Resolve Off
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup1 = (Units of type Spiderlord)
      • Set AbilityAdd = Strengthened Resolve Armor Boni
      • Unit Group - Pick every unit in tempGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Strengthened Resolve ) Equal to False
            • Then - Actions
              • Unit - Remove AbilityAdd from (Picked unit)
              • Unit Group - Remove (Picked unit) from tempGroup1
            • Else - Actions
      • Custom script: call DestroyGroup (udg_tempGroup1)
not much but i'm really a novice.

/////EDIT: Tested in game and it works perfectly for all three levels! Thank you ! Nichilus for your helpful and although it frustrated me at first i'm glad you didn't just spoon-feed me the answer but instead gave a good explanation of what needed to be done allowing me to actually learn hot to do it. :D
 
Last edited:
Status
Not open for further replies.
Top