I have been working a lot lately trying to come up with ways that i can give Attributes to the hero's in my game and having them not stack on themselves. I am having a particularly tough time with an attribute "Swiftness" it is suppose to increase the attack speed of a unit by 1% per stack of the attribute, and the challenging part is to do this where the attack does not Stack on top of itself.
I am working on a way to do this with catalogs, The goal of my trigger is to take a unit who has gained/lost attribute points in swiftness then lookup the reference to that unit's weaponid then set the Period of the weapon equal to it's unmodified period multiplied by (1+({Stacks of Swiftness}*.01))^-1. This should give me the effect i am looking for, am i am pretty sure that the Period field of a weapon is allowed to be modified through catalogs (as it is available to change through upgrades).
(side note: i pull the Period on the weapon for player 9 because player 9 in my game never gets a hero with any attributes at all, so i can reference the original period of the weapon and modify it from there)
(side note 2, i set the variable to get the id of the weapon because i would have to reference that weapon id 2x in the next action, so i made the computer get it 1 time and save it, just to make it a bit easier on the computer)
Unfortunately the trigger does not work correctly, every time a hero gains points in Swiftness i get the following Error
"Trigger error in
'gt_Set Swiftness Globals_Func': Could
not get 'entry' from parameter in
'CatalogFieldValueSet' (value: 0)
What did i do wrong? is there something wrong with the way i made my trigger?
Anyone have any ideas? whats the deal with this error? Any help would be greatly appreciated.
Ive rechecked it several times and i cant seem to find where the ID could be wrong,
And i intentionally referenced player 9 because player 9 does not ever get a hero so i can reference the weapon speed default of the hero, before it has been modified by other points in swiftness.
@Helral: Go
Helral you are truly a Mapster Genius it works excellently, i am still unsure of why the old one did not work but that does not really matter anymore.
Thanks a ton
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have been working a lot lately trying to come up with ways that i can give Attributes to the hero's in my game and having them not stack on themselves. I am having a particularly tough time with an attribute "Swiftness" it is suppose to increase the attack speed of a unit by 1% per stack of the attribute, and the challenging part is to do this where the attack does not Stack on top of itself. I am working on a way to do this with catalogs, The goal of my trigger is to take a unit who has gained/lost attribute points in swiftness then lookup the reference to that unit's weaponid then set the Period of the weapon equal to it's unmodified period multiplied by (1+({Stacks of Swiftness}*.01))^-1. This should give me the effect i am looking for, am i am pretty sure that the Period field of a weapon is allowed to be modified through catalogs (as it is available to change through upgrades).
Anyway, I made this Trigger
(side note: i pull the Period on the weapon for player 9 because player 9 in my game never gets a hero with any attributes at all, so i can reference the original period of the weapon and modify it from there)
(side note 2, i set the variable to get the id of the weapon because i would have to reference that weapon id 2x in the next action, so i made the computer get it 1 time and save it, just to make it a bit easier on the computer)
Unfortunately the trigger does not work correctly, every time a hero gains points in Swiftness i get the following Error
"Trigger error in 'gt_Set Swiftness Globals_Func': Could not get 'entry' from parameter in 'CatalogFieldValueSet' (value: 0)
What did i do wrong? is there something wrong with the way i made my trigger? Anyone have any ideas? whats the deal with this error? Any help would be greatly appreciated.
You entered an incorrect ID somewhere. That's what that error means.
Also for some reason the trigger references player 9. Doesn't seem intended?
@Eiviyn: Go
Ive rechecked it several times and i cant seem to find where the ID could be wrong,
And i intentionally referenced player 9 because player 9 does not ever get a hero so i can reference the weapon speed default of the hero, before it has been modified by other points in swiftness.
@Antimatterthunder: Go
Why not use: UnitWeapon(Triggering Unit, 1) to get the weapon?
Edit: I just reread the trigger and the only thing that I can think off that goes wrong is that it can not get the weapon id orso...
@Helral: Go Helral you are truly a Mapster Genius it works excellently, i am still unsure of why the old one did not work but that does not really matter anymore.
Thanks a ton