• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

AoE knockback and attack speed spell.

Status
Not open for further replies.
Level 2
Joined
Apr 13, 2007
Messages
17
Hey there, i need help with 2 spells. The first one is a passive ability that gives the hero 0.5/1.0/1.5% attack speed for each point of strength he has. That advanced trigger was the only one i could find that could increase attack rate for a hero/unit. The spell doesnt have to be MUI, i would prefer if it could be done in GUI, but jass is ok too.

  • Holy Strength
    • Events
      • Unit - Lieutenant 0318 <gen> Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Special Chen - Attribute Bonus
    • Actions
      • Advanced - For (Owner of Lieutenant 0318 <gen>) Increase attack rate for all units that use the Human Upgrade Set 1 by (((Real((Level of Holy Strength for Lieutenant 0318 <gen>))) x 0.50) x (Real((Strength of Lieutenant 0318 <gen> (Include bonuses)))))
I made a spell named protect, which i based on banish.
You cast it on a unit friendly or unfriendly, and all units around that unit gets knockbacked+slowed+damaged.
This is what i have done so far:

  • ProtectINIT
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Protect
    • Actions
      • Set ProtectCaster = (Triggering unit)
      • Set ProtectTarget = (Target unit of ability being cast)
      • Trigger - Turn on ProtectEffect <gen>
  • ProtectEffect
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set ProtectTargetGrp = (Units within (100.00 + (50.00 x (Real((Level of Protect for ProtectCaster))))) of (Position of ProtectTarget) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of ProtectCaster)) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KnockbackCounter Less than 5.00
        • Then - Actions
          • Unit - Create 1 Dummy for (Owner of ProtectCaster) at ProtectCasterLoc facing Default building facing (270.0) degrees
          • Unit - Add ProtectDummy to (Last created unit)
          • Unit - Set level of ProtectDummy for (Last created unit) to (Level of Protect for ProtectCaster)
          • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
          • Unit Group - Pick every unit in ProtectTargetGrp and do (Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 60.00 towards (Angle from (Position of ProtectCaster) to (Position of (Picked unit))) degrees))
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set KnockbackCounter = (KnockbackCounter + 1.00)
        • Else - Actions
          • Set KnockbackCounter = 0.00
          • Trigger - Turn off (This trigger)
The problem is that it only knocks the units back, and the flakcannons special effect doesnt get attached and neither does the dummy unit use ProtectDummy (thunderclap).
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Speical effect won't show because you put the Picked Unit as an argument, which is 'no unit'/null, I'll explain why. If you want to do multiple actions with a unit group, use Pick Every Unit In Unit Group And Do Multiple Actions. Your way won't work because you used a single action type, the action that only allows you to do one action per unit.

I don't exactly see why the dummy unit won't cast, check:

- if the mana cost of ProtectDummy is 0
- if ProtectDummy ability even works ;)
- if ProtectDummy is a unit ability
- if ProtectCasterLoc is declared, because I don't see where you declared it :)

Uhmm don't you want to add an expiration timer for that dummy unit? And don't forget to destroy ProtectCasterLoc with Custom Script: call RemoveLocation(udg_ProtectCasterLoc)

Landy said:
OMFG WEU triggers O_O

Grrrr if you don't have anything useful to say, don't say anything at all. There is just one miserable advanced action and you instantly go "OMFG".
 
Level 6
Joined
Mar 8, 2007
Messages
192
It does work, but i wont recommend weu, it makes you lazy and you wont learn much from using all these premade actions.
WEU is for lazy asses^^
 
Level 6
Joined
Mar 8, 2007
Messages
192
No its easy, first you download the heroglow model. Then you attach the special effect by using a invisible ability. Like the Fountain Healing thingy, without healing.
And there you go, Heroglow without Weu.
 
Level 6
Joined
Mar 8, 2007
Messages
192
The last time i found mine was on thehelper, i used the search engine there and found it after several minutes. Maybe google would help.
 
Level 2
Joined
Apr 13, 2007
Messages
17
I made it work now, the problem was that protectcasterloc wasnt defined. When i try to make a custom script to remove it, it makes an error when i try to enable it which goes (line 209: expected a name) I tried to copy the exact removelocation script from another one of my triggers and replacing the variable name in case i had done osmething wrong but it just wont work. Any ideas?
 
Status
Not open for further replies.
Top