Wait. I've actually got a better idea (in a way).....when the spell is cast, set the custom value of the unit to the spell's current level....that'll track the spell level accurately and along with it, the buff level.
Note: If you're already using custom value, then you could probably use an integer array / hashtable to achieve the same purpose.
with 1 simple exception, i cannot afford a Unit Custom value on a thing such as a spell. Each unit can have 1 custom value and it shouldnt be wasted on a thing such as buff detection
Edit: probably, but it would just take up time, i think i will go with a dummy ability in a spellbook
btw is there a limit to the number of abilities the unit has?
EDIT EDIT:
how would an integer array look for this certain problem, u mind posting it? I dont get how should that be made.
You could use two arrays (one unit array and one integer array). The unit array stores the unit and the integer stores the corresponding level of buff/spell.
and than how do i determin which is the X of the unit when i need to check what is the buff level?
Lets say i casted a spell, w8ed 3 seconds and casted again on same target, now the spell should have greater effect.
I need to check does my target have a buff on the cast, 1st time it wont, second time it will, than i need to run Integer A 0-XYZ and check is my target = to target [integer A] ??? that would cause MASSIVE flood of RAM in my oppinion. Imagine 50 heroes, 4 spells, god knows how many units in map, epicnesssss
LAWL, it was from a copy of my triggers, I removed it now(the add unit in another trigger event)
maximum is 8190 (i think is enough)
the loop checks if the unit that the previous 2 triggers register/set is the one who cast the skill and then the bufflevel[X] is set.
X is the number of the unit registered in the previus 2 triggers.
Its completely lagless.
You can modify it how you want to.
Every action I think takes 0.0000000001 seconds to be executed.
I have an ability, an arrow of sorts. (ever played DotA? Mirana like arrow)
When it hits a target, it applies an armor bebuf that lasts for x seconds. Arrow has no cooldown and the debuff stacks 3 times. There are 4 levels of the ability and that makes me have to calculate which level the ability was that fired it before lvling up dummy unit's ability in order to apply stronger buff.
However,
if you mouseover a buff in the status there is a field that says Level: X
if i could somehow get that value it would be a peace of cake, but like this it took me all day to figgure a solid way to do it. However it is really "hard" on the system because of too much If/Then/Else checks.
So i need some good way to detect what level of ability is used on a unit in order to increase the dummy ability and apply a stronger debuf.
Also how do i preload soemthing in order to make it not have a screen freeze when it is used first time in a game?
if you add a never used ability to a dummy, you get a about a second freeze.
the best method to fix this is to place all this loading on map init. create a trigger that creates a dummy, adds all custom skills to your dummy that are added via trigger by some other skills, and remove your dummy
Just use the 100 different buffs method. There is no possible way to check the level of buff with triggers.
Another method is use damage detection event to detect the damage source (which is the caster), then check the level of the ability of the caster, and relate it to the buff level on the affected unit. This would require your spell to deal damage (but it doesn't really matter, any spell that deals 0 damage triggers the event). Acid Bomb is usually used.
Explain clearly what you want to do. Elune's Arrow? How do you trigger the spell? Is it just some missile ability spell (Storm Bolt, Acid Bomb) or you trigger the movement of the missile? When it hits, it apply what buff? Slow? Stun?
The dummy unit is suppose to cast a spell on the target, the spell level is determined by the stack number as well as with the level of ability the hero has.
I want to keep thigns MUI
Now i run into a problem when detecting which buff the unit has, because depending on the buff the unit should apply different level ability to a dummy. And since i cannot detect the level of the buff im left with no options but to make a different buff for every level of the dummy ability and than check which exact buff the unit has.
I managed to do it with a dummy sphere ability added to the target and it's level set to the number of stacks or to be more precise i checked wheather the unit has a sphere ability. If no than add it and set the sphere level to 1, if it has an ability, then check it's level and increase it by 1, limited to 3 and by this determined what level should the dummy unit ability have.
With some math i manage to make a pattern that wont override the ability levels and figgured the thing out, but than i ran into another problem.
The unit has it's sphere ability forever meaning that basically even when the buff expires he will still be detected as a unit with numebr of stacks equal to his sphere ability level. To prevent this I added the unit into the group and am removing the units that do not have a buff from the group, and removing their sphere abilities.
But this forces me to make a permanent group and that causes leaks no?
So how should i go around this?
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory
I will be AFK for a couple of days you guys hold down the fort while I am gone. I will be checking in on my phone but that will severly limit me. Be back saturday!
I just got to watch the video because even though I was there I was trying to work out tech problems with the chat since I was the social media guy so I was distracted but check it out guys the video is super fucking great!