Help with making spells !!

Kosire

New Member
Reaction score
0
Hello, it's been a while. I'm now working extensivly on some Heroes for me and my friend's Hero Wars map we're making. I'm sure Ill need help for many many more spells. but for now, it's the first hero.
Spell: Apply Acid - For x seconds the hero's attacks slow enemy movement speed for x seconds by x%. I have the dummy spell made. I don't know how, or if I have to trigger this. If you could just give me some basic spell triggering tips it could prevent future noob posts as well ^_^

Edit: It gives a buff. Is there I way I can say to "have x effect while Hero has this buff" ?
 

Joccaren

You can change this now in User CP.
Reaction score
54
When they activate it, add them to a unit group and when they disactivate the ability, remove them from the unit group. Everytime a unit is attacked, check if its in the unit group and if it is, create a dummy and order it to cast cripple on the attacked unit.
 

Kosire

New Member
Reaction score
0
When they activate it, add them to a unit group and when they disactivate the ability, remove them from the unit group. Everytime a unit is attacked, check if its in the unit group and if it is, create a dummy and order it to cast cripple on the attacked unit.

How do I do like DotA does. make a "Buff Placer" that places a slowing buff on an enemy when they are attacked by a unit with the "Apply Acid" buff
Ntmention, I don't know how to use a dummy to cast
 

Joccaren

You can change this now in User CP.
Reaction score
54
Try, instead of checking if the unit is in the unit group, checking if it has the specific buff then create the dummy ect.

To use dummies, create a unit based off a shade. Change its model file to .mdl and all of the shadow sections to none and 0. Then, give it the ability locust and remove all other abilities. Create a dummy ability for the shade which has the effects that you want your ability to have (In this case, slow) and give it 0 mana cost, o cooldown, no techtree requirements. Then, give this to the dummy unit it the OE. Then use this trigger:

Event: Unit is attacked
Conditions: (Attacking unit) has (YourBuff) equal to true
Actions: Create one (Dummy) for (Owner of (Attacking Unit)) at (position of (Attacking Unit))
Order (Last Created Unit) to (Human-Soreress-Slow) Target Unit of ability being cast
Add a 1 second generic expiration timer to (Last Created Unit)


This has a few location leaks but it works. Also, Human-Sorceress-Slow should be changed to whatever the base for your dummy's slow spell is.
 

Kosire

New Member
Reaction score
0
wont creating a dummy on every attack create alot of lag really fast because theres new units every attack there'll be lots of invisible units taking up space
 

Joccaren

You can change this now in User CP.
Reaction score
54
It will only create a dummy when a unit with the buff attacks. This is likely how DotA did it as well. There is no way of giving a unit a buff other than with a spell. The expiration timer removes the unit once it is finished with so you won't have a million just lying around your map.
 

Kosire

New Member
Reaction score
0
It will only create a dummy when a unit with the buff attacks. This is likely how DotA did it as well. There is no way of giving a unit a buff other than with a spell. The expiration timer removes the unit once it is finished with so you won't have a million just lying around your map.

Trigger:
  • Apply Acid
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Apply Acid ) Equal to True
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Sorceress - Slow (Attacked unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)


Edit: it worked :) thanks +rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top