HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stacking Buff Help

12-06-2007, 02:25 AM#1
Burning Rose
This is a spell based off Chain Lightning, turned into a Melee one-unit damage attack. It's "Supposed" to apply a stacking buff to nearby Rangers or Footman that the Hero summons, a permanent buff, that increases the damage and armor of the Unit (Based on Inner Fire). Each level increases the amount of possible stacks, all the way up to ten. The stacking part works, I've figured that out (Unless there's some easier way to do it), but whenever I use it in-game it only will pick one nearby unit and apply the buff. I've tried adding a wait function at the end of the Pick, but that did the same thing except added some lag. The wierd thing is, all the units that should be picked get the special effect, which means they are picked. The issue instead seems to be something with perhaps the Picked Functions overlapping and giving orders to the same unit when it should be each unit. Of course, I'm not sure, that's just me speculating based on what I know. So if anyone's dealt with this sort of thing before, or can tell what's wrong, that would be great because this spell is really important to the Hero's playstyle.


Hidden information:
Trigger:
Instructional Strike
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Instructional Strike
Collapse Actions
Collapse Unit Group - Pick every unit in (Units within (400.00 + ((Real((Level of (Ability being cast) for (Triggering unit)))) x 30.00)) of (Position of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to Footman Level 9) or ((Unit-type of (Matching unit)) Equal to Ranger (Level 9 and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 9) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 10
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 10) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 9 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 8) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 9
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 9) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 8 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 7) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 8
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 8) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 7 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 6) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 7
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 7) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 6 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 5) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 6
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 6) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 5 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 4) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 5
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 5) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 4 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 3) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 4
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 4) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 3 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 2) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 3
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 3) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 2 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 1) Equal to True
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 2
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 2) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Remove Instructional Strike 1 buff from (Picked unit)
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Instructional Strike 1) Equal to False
((Picked unit) has buff Instructional Strike 2) Equal to False
((Picked unit) has buff Instructional Strike 10) Equal to False
((Picked unit) has buff Instructional Strike 3) Equal to False
((Picked unit) has buff Instructional Strike 4) Equal to False
((Picked unit) has buff Instructional Strike 5) Equal to False
((Picked unit) has buff Instructional Strike 6) Equal to False
((Picked unit) has buff Instructional Strike 7) Equal to False
((Picked unit) has buff Instructional Strike 8) Equal to False
((Picked unit) has buff Instructional Strike 9) Equal to False
(Level of (Ability being cast) for (Triggering unit)) Greater than or equal to 1
Collapse Then - Actions
Unit - Create 1 HERO (Battle Trainer 1) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Else - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
Special Effect - Destroy (Last created special effect)


Then again, it may have something to do with the Buff conditions, seeing as how my other "Create Unit, Order Unit to cast spell on picked unit" spells for Stuns and slows and whatnot seem to work fine.

-Edit: Oh, I did more testing. I took out the 'Does not have buff' Conditions in the If-Then for the first stack, and the result was the same.
12-06-2007, 02:57 AM#2
rain9441
I thought a unit could not have more than one buff derived from the same base ability at one time?

Meaning you can't have 10 inner fires at once. 1 and only 1. Even if you have 10 custom abilities based on inner fire and each has different buffs, any given unit can only have ONE of those buffs, any subsequent cast will override the previous.

Maybe I'm wrong. There are abilities that do stack, but I'm almost certain inner fire does not. Slow poison for instance can (it has stacking flags :P), auras can (if different buff), I believe certain orb effects can.

99% positive Inner fire, Bloodlust, Cripple, Acid bomb, Faerie Fire, and others similar to them can never have their effects stack multiple times on a unit.
12-06-2007, 03:43 AM#3
Burning Rose
Yes, I know that. That's why i have a trigger to stack it. And does Slow Poison actually stack like that? I wasn't completely sure about that. If I could get the specifics about how that one stacks from someone, i would be fantasmically grateful.
12-06-2007, 01:26 PM#4
rain9441
Oh i see your problem, and i'm not quite sure why its occuring but i do know how slow poison stacks!

Slow poison stacks per attacker. If the stacking flag "Kills unit" is set it can reduce the hp of the unit to 0, otherwise they hover at 1 (this one is easy).

If attack speed AND movement speed flags are set (this is quirky) then every unit with the slow poison ability will reduce the attack speed/movement speed of the target by the % when it attacks. Further attacks from the same unit WILL NOT reduce movement further.

If your slow poison reduces movement speed by 5% and has stacking flags movement then:
1 unit attacks, 5% slow
same unit attacks again, still 5% slow
a second unit attacks, 10% slow
a third unit attacks, 15% slow...
10 different units attack: 50% slow.

Keep in mind this is on a per unit basis so if you spawn a new dummy and order it to attack once it will always be a different unit, so every dummy will slow by 5%.

The same above applies to "damage" stacking, each unit will only ever deal X dps to the target. If damage stacking is not set to false, the target will only take X dps no matter how many different units attack it.

I have no idea how it chooses WHO deals the DPS to the target in the case of damage not stacking (probably first who applied the debuff).

Slow poison stacking occurs based on the buff and base ability associated with it.

If you have 10 slow poison abilities all with the exact same buff, then the first ability to affect the target takes precedence. EG, the first unit has slow poison with 10%/10sec slow, and attacks a target. The target is slowed by 10% for 10 seconds. Another unit has a 50%/30sec slow poison and attacks a target, the target is slowed for 10% for 30 seconds. If you swap the order of attacks you get 50% slow for 10 seconds. If they have different buffs then you have 60% slow.
12-06-2007, 01:53 PM#5
Gorman
just to clear a few things thing up; there is 2 slow poison abilities, one is stacking, one is not, if u get confused u can get really pissed off.
also i thought u had to use the And, (multiple functions)/Or, (multiple functions) wen u hav mutliple conditions, i see u didnt in ur trigger, that may be causing a problem, but i dont realy know its worth a try.

And also i always assumed that buffs were just markers, for tracking which unit should hav which effect, they cant MAKE stuff happen, u need a dummy unit to cast it (this is pretty much unrelate, except its to do with buffs) can sum1 tell me if im right about that.

if ur not sure where ur trigger is screwing up, a good thing to do is put sum text thingys in, so it says "part 1 complete" or watever wen the trigger goes, so u know which bit isnt working. just a suggestion...
12-06-2007, 10:46 PM#6
Burning Rose
Oh thanks for the Poison thing, I'm going to have to adapt one of my Hero's abilities if it's per Unit >_>

Yeah, I have the dummy unit there. A different version of the "HERO" Unit for each level, each with it's own level of Holy Fire that pertains to that amount of stacks.

And again on the Side note of slow poison (Though remember the main purpose of this thread is to figure out what's wrong with my trigger, because I can't find it for the life of me), when a unit adds a stack of slow poison to an enemy, does it refresh the entire buff, or do individual units' stacks have individual timers?
12-09-2007, 06:25 PM#7
Burning Rose
Bump