Hey, I have a custom action that reads and changes a bunch of catalogue values.
It runs once just fine, but the second time it runs, it gives me a "cannot be read" error, and then since im setting it based on its own value, it gets set to 0.
Is this common, is there a way around it?
EldradinitiativefunctionOptions:ActionReturnType:(None)ParametersHero=NoUnit<Unit>GrammarText:DoEldradUlthraninitiativefunctionsforUnitHintText:(None)CustomScriptCodeLocalVariablesinitiative=(CustomvalueInitiativeofHero)<Real>BaseAttackSpeed=1.7<Real>Scrycooldown=0.0<Real[6]>
guide cooldown = 0.0 <Real[6]>
fortune cooldown = 0.0 <Real[6]>
doom cooldown = 0.0 <Real[6]>
path cooldown = 0.0 <Real[6]>
storm cooldown = 0.0 <Real[6]>
staff cooldown = 0.0 <Real[6]>
int = 0 <Integer>
Actions
Catalog - Set value of Weapons PsychicDischarge Period for player (Owner of Hero) to (String((Base Attack Speed * (1.0 - (initiative * attack time per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 6 with increment 1, do (Actions)
Actions
Variable - Set Scry cooldown[int] = (Value of Abilities ScryersGaze Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities ScryersGaze Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((Scry cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 5 with increment 1, do (Actions)
Actions
Variable - Set guide cooldown[int] = (Value of Abilities Guide Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities Guide Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((guide cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 5 with increment 1, do (Actions)
Actions
Variable - Set fortune cooldown[int] = (Value of Abilities Fortune Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities Fortune Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((fortune cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 5 with increment 1, do (Actions)
Actions
Variable - Set doom cooldown[int] = (Value of Abilities Doom Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities Doom Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((doom cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 5 with increment 1, do (Actions)
Actions
Variable - Set path cooldown[int] = (Value of Abilities ThePathBeyond Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities ThePathBeyond Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((path cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 5 with increment 1, do (Actions)
Actions
Variable - Set storm cooldown[int] = (Value of Abilities EldritchStorm Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities EldritchStorm Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((storm cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
General - For each integer int from 0 to 2 with increment 1, do (Actions)
Actions
Variable - Set staff cooldown[int] = (Value of Abilities StaffofUlthamar Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
Catalog - Set value of Abilities StaffofUlthamar Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((staff cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
I think I figured it out. If the attribute changing fires off the oh trigger that's fine, cause nothing will be changes in the hp trigger (the correct values have been set and it'll register a change of 0)
I'll just need to put blocking in there so only one trigger has access to the units hp at one time. (Wait for time actions I think would work)
attributes give a % of total hp. So 1 attribute = 5% bonus max hp.
you can give live fraction with attributes, but it doesnt affect bonus hp gained from leveling
Im trying to trigger a passive that does stuff whenever spells are cast, ONLY if the hero has already learned one of its abilities
the problem im having is that current level of ability for unit == 1, returns false when the ability is level 1 (i guess its checking the level index? which first level is technically 0)
however, if i say current level of ability for unit == 0, it also runs when the unit hasnt learnt the ability yet.
and if something both increased hp and changed attributes at the same time? would that not still mess up because the trigger fires the first time, shuts itself off, and then the second time its not active to fire
So I'm having difficulty working my mind around a way to get this to work. I have two triggers. both modify hp, and the event of one is units hp is modified.
Ill copy my two triggers out below. Basically, I have an attribute that modifies total hp. one trigger fires whenever a unit's attribute is modified, and if it is, update its hp. I have another trigger that when its hp is modified (level up or items), it updates its total hp based on its attribute. I disable the hp modifying trigger in both triggers to prevent infinite loops and the attribute modifying the hp twice.
everything works well if only one thing changes at a time, but there will be scenarios eventually where something may modify both at once. IF this happens, the attribute trigger disables the hp trigger, so the actual hp change isnt registered.
How can I prevent attribute gains from firing the hp changes trigger, but also allow for something to increase both the attribute and hp at the same time?
i hope i explained that properly, ask if anything doesnt make sense
So weird thing, the damage type was set to spell, and the splash damage type was set to spell, and it ran literally 30 times
I changed the splash damage type to splash, and it worked properly.
I have an ability that creates a persistant that deals damage periodically in an aoe.
no matter what damage i put (its supposed to be 50), it kills any units it hits in one shot.I have the kill flag *not* checked. I even made the persistant use a different correctly functioning aoe damage effect, and they still died. So im inclined to believe its not the damage effect
what other things may be causing units to die in one shot
the effects im using and the tree
ability -> persistant (A)
A, initial -> Set(1)
A, periodic -> Set(2)
set(1) -> damage, search(1), search(2)
search(1) -> apply behaviour (slow)
search(2) -> apply behaviour (stun)
set(2) -> search(2), search(3)
search(3) -> damage effect (one target only)
damage -> aoe damage, dealing 50
that should be all the stuff im using, and I have no idea what may be causing units to always die
I have an ability with max charge = 4, starting charges = 4, and charges used = 0
if I set the charges used to 1, i can modify its charges with triggers
if i set the charges used to 0, i cannot modify its charges with triggers
is there anyway to work around that? Id prefer to keep the charge count visible
is there a trigger event that fires when a button is cliked, weather or not the ability goes through? because i can refund charges when the ability is used, but i cant use it (and want to be able to use it) when it has 0 charges. is it possible to detect when an ability is attempted to be used, even if theres not enough mana/cooldown/charges?
(just for the record, the charges on the ability has nothing to do with the functioning of the ability itself. the charges are used for other things)
A is an active ability that refreshes all other abilities.
It also gains one charge for every B spell cast, and when it has 5 charges, casting a B spell resets the charges back to 0 and B doesn't go on cooldown
So I'm giving charges to an ability that doesn't use charges itself. That may be the problem.
I mean I can trigger it all but id like the charges to show. And ATM it's always showing 5, no matter what I do to it with triggers
0
Yes I am
0
Hey, I have a custom action that reads and changes a bunch of catalogue values.
It runs once just fine, but the second time it runs, it gives me a "cannot be read" error, and then since im setting it based on its own value, it gets set to 0.
Is this common, is there a way around it?
0
I think I figured it out. If the attribute changing fires off the oh trigger that's fine, cause nothing will be changes in the hp trigger (the correct values have been set and it'll register a change of 0) I'll just need to put blocking in there so only one trigger has access to the units hp at one time. (Wait for time actions I think would work)
0
Excellent : ) I got it working. Now I just need to figure out why the central actor jumps up on the last 2 periods of the persistant
0
attributes give a % of total hp. So 1 attribute = 5% bonus max hp.
you can give live fraction with attributes, but it doesnt affect bonus hp gained from leveling
0
thats what i wasnt hoping for : P
ill see what I can do with what you suggest
0
Im trying to trigger a passive that does stuff whenever spells are cast, ONLY if the hero has already learned one of its abilities
the problem im having is that current level of ability for unit == 1, returns false when the ability is level 1 (i guess its checking the level index? which first level is technically 0) however, if i say current level of ability for unit == 0, it also runs when the unit hasnt learnt the ability yet.
is there anyway around that?
0
@Charysmatic: Go
and if something both increased hp and changed attributes at the same time? would that not still mess up because the trigger fires the first time, shuts itself off, and then the second time its not active to fire
0
Hey,
So I'm having difficulty working my mind around a way to get this to work. I have two triggers. both modify hp, and the event of one is units hp is modified.
Ill copy my two triggers out below. Basically, I have an attribute that modifies total hp. one trigger fires whenever a unit's attribute is modified, and if it is, update its hp. I have another trigger that when its hp is modified (level up or items), it updates its total hp based on its attribute. I disable the hp modifying trigger in both triggers to prevent infinite loops and the attribute modifying the hp twice.
everything works well if only one thing changes at a time, but there will be scenarios eventually where something may modify both at once. IF this happens, the attribute trigger disables the hp trigger, so the actual hp change isnt registered.
How can I prevent attribute gains from firing the hp changes trigger, but also allow for something to increase both the attribute and hp at the same time?
i hope i explained that properly, ask if anything doesnt make sense
0
So weird thing, the damage type was set to spell, and the splash damage type was set to spell, and it ran literally 30 times I changed the splash damage type to splash, and it worked properly.
0
If it comes down to it, we can rip some wc3 models that are fitting. But we are looking for any user made custom models that would work.
If anyone wants to design models, or if we can figure out a way to rip from DoW, that would probably be the best case scenario
0
I have an ability that creates a persistant that deals damage periodically in an aoe. no matter what damage i put (its supposed to be 50), it kills any units it hits in one shot.I have the kill flag *not* checked. I even made the persistant use a different correctly functioning aoe damage effect, and they still died. So im inclined to believe its not the damage effect
what other things may be causing units to die in one shot the effects im using and the tree ability -> persistant (A)
A, initial -> Set(1)
A, periodic -> Set(2)
set(1) -> damage, search(1), search(2)
search(1) -> apply behaviour (slow)
search(2) -> apply behaviour (stun)
set(2) -> search(2), search(3)
search(3) -> damage effect (one target only)
damage -> aoe damage, dealing 50
that should be all the stuff im using, and I have no idea what may be causing units to always die
0
I have an ability with max charge = 4, starting charges = 4, and charges used = 0
if I set the charges used to 1, i can modify its charges with triggers if i set the charges used to 0, i cannot modify its charges with triggers
is there anyway to work around that? Id prefer to keep the charge count visible is there a trigger event that fires when a button is cliked, weather or not the ability goes through? because i can refund charges when the ability is used, but i cant use it (and want to be able to use it) when it has 0 charges. is it possible to detect when an ability is attempted to be used, even if theres not enough mana/cooldown/charges?
(just for the record, the charges on the ability has nothing to do with the functioning of the ability itself. the charges are used for other things)
0
would I edit the user's actor directly, or can I make something just turn the casting unit transparent.
potentially many units could have this buff, so editing all the actors would be something I would want to avoid if possible
0
Haha sorry I suck at explaining.
A is an active ability that refreshes all other abilities. It also gains one charge for every B spell cast, and when it has 5 charges, casting a B spell resets the charges back to 0 and B doesn't go on cooldown
So I'm giving charges to an ability that doesn't use charges itself. That may be the problem. I mean I can trigger it all but id like the charges to show. And ATM it's always showing 5, no matter what I do to it with triggers