Ok, so here's what I'm trying to do;
Create a spell (castable on enemy heroes) which, when cast, gives the target hero a buff lasting 3 seconds. When this hero goes near another hero to which it is allied, the new hero is zapped, and given the buff also. Essentially what this should result in is the buff spreading by heroes being within X range of each other, until none of them is within that range of each other for 3 seconds. Then no unit will have the buff and the spell ends. Damage will be dealt bla bla bla bla so on.
The problem I have here is this, when I cast the spell on a hero, it duly zaps a hero near it, and then another. All told up to 3 heroes may be zapped at once, though I can't tell if this is going both ways between two units which both have the buff. However, what it ISN'T doing, which is what I'm trying to achieve, is to have all the heroes near each other being constantly zapped every X seconds. Here are the triggers;
Bloodlust is the spell which applies the buff, Chain Lightning is the lightning effect for it (called Soul Shackles effect).
Any thoughts please anyone? Thanks in advance
EDIT: It seems that while units are having the buff applied by the dummy casting bloodlust, the damage isn't actually being implemented... Wonder what this implies :s
2nd EDIT: Changed the 3rd trigger, now it seems to work a lot closer to what I wanted, but still not perfect, since it doesn't hit every unit every time, works more like a chain lightning, which is not what I want. Edited the trigger. Fixed damage being given, and it seems to be given to all the units it should be, but the spell isn't being cast on all of them. Not cool Really stuck at this point. Help me please TH! I need your wisdom!
Create a spell (castable on enemy heroes) which, when cast, gives the target hero a buff lasting 3 seconds. When this hero goes near another hero to which it is allied, the new hero is zapped, and given the buff also. Essentially what this should result in is the buff spreading by heroes being within X range of each other, until none of them is within that range of each other for 3 seconds. Then no unit will have the buff and the spell ends. Damage will be dealt bla bla bla bla so on.
The problem I have here is this, when I cast the spell on a hero, it duly zaps a hero near it, and then another. All told up to 3 heroes may be zapped at once, though I can't tell if this is going both ways between two units which both have the buff. However, what it ISN'T doing, which is what I'm trying to achieve, is to have all the heroes near each other being constantly zapped every X seconds. Here are the triggers;
Trigger:
- Soul Shackles Cast
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Soul Shackles
- Actions
- Set Shackler = (Triggering unit)
- Set TempPoint = (Position of (Triggering unit))
- Unit - Create 1 Dummy 3 for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
- Unit Group - Add (Last created unit) to DummyGroup
- Set ShackleDummy = (Last created unit)
- Set Shackleable = (Units in (Playable map area) matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is A Hero) Equal to True)))
- Custom script: call RemoveLocation(udg_TempPoint)
- Trigger - Turn on Soul Shackles Effect <gen>
- Events
Trigger:
- Soul Shackles Buff
- Events
- Unit - A unit Begins casting an ability
- Conditions
- ((Ability being cast) Equal to Soul Shackles ) or ((Ability being cast) Equal to Soul Shackles Effect )
- Actions
- Unit Group - Add (Target unit of ability being cast) to Shackled
- Unit - Order ShackleDummy to Orc Shaman - Bloodlust (Target unit of ability being cast)
- Events
Trigger:
- Soul Shackles Effect
- Events
- Time - Every 0.50 seconds of game time
- Conditions
- Actions
- Unit Group - Remove all units of AlreadyShackled from AlreadyShackled
- Unit Group - Pick every unit in Shackled and do (Actions)
- Loop - Actions
- Set TempUnit = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (TempUnit has buff Shackled Soul ) Equal to True
- Then - Actions
- Set TempPoint = (Position of TempUnit)
- Set TempGroup = (Units within 500.00 of TempPoint matching ((((Matching unit) is in Shackleable) Equal to True) and ((((Matching unit) is in AlreadyShackled) Equal to False) and ((Matching unit) Not equal to TempUnit))))
- Unit - Create 1 Dummy 3 for (Owner of Shackler) at TempPoint facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit Group - Add (Last created unit) to DummyGroup
- Unit Group - Remove all units of AlreadyShackled from AlreadyShackled
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
- Unit Group - Add (Picked unit) to AlreadyShackled
- Unit - Cause Shackler to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Normal
- Loop - Actions
- Custom script: call RemoveLocation(udg_TempPoint)
- Unit Group - Remove all units of TempGroup from TempGroup
- Else - Actions
- Unit Group - Remove TempUnit from Shackled
- If - Conditions
- Set TempUnit = No unit
- Loop - Actions
- Events
Bloodlust is the spell which applies the buff, Chain Lightning is the lightning effect for it (called Soul Shackles effect).
Any thoughts please anyone? Thanks in advance
EDIT: It seems that while units are having the buff applied by the dummy casting bloodlust, the damage isn't actually being implemented... Wonder what this implies :s
2nd EDIT: Changed the 3rd trigger, now it seems to work a lot closer to what I wanted, but still not perfect, since it doesn't hit every unit every time, works more like a chain lightning, which is not what I want. Edited the trigger. Fixed damage being given, and it seems to be given to all the units it should be, but the spell isn't being cast on all of them. Not cool Really stuck at this point. Help me please TH! I need your wisdom!