• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Bug with setting attribute bonus??

Status
Not open for further replies.
Level 4
Joined
Feb 25, 2010
Messages
73
I posted a thread yesterday about a bug with the Game Cache don't storing the Attribute Bonus ability ( http://www.hiveworkshop.com/forums/triggers-scripts-269/problem-attribute-bonus-191457/#post1867274 ).

Now i tried to setting the level of Ability Bonus ability using triggers and the Game Cache... But, for some reason, it is not working. The ability, in the next map, stay in the level 0 (even if i take 1 or more levels in the first map)

Trigger Map 1 (Runned by another action in another trigger (too big to post here...)

Game Cache
Events
Conditions
Actions
Game Cache - Create a game cache from YourCache.w3v
Set YourCache = (Last created game cache)
Game Cache - Store Twarokk as MainHero of Heroes1 in YourCache
Set AttributeBonusPoints = (Level of Attribute Bonus (Another) for Twarokk)
Game Cache - Store AttributeBonusPoints as AttributeBonusTwarokk of Status1 in YourCache
Game Cache - Save YourCache

---

Triggers Map 2:

Recreate GameCache*
Events
Map initialization
Conditions
Actions
Game Cache - Create a game cache from YourCache.w3v
Set YourCache = (Last created game cache)
Trigger - Run Load Twarokk <gen> (checking conditions)


Load Twarokk*
Events
Conditions
Actions
Game Cache - Restore MainHero of Heroes1 from (Last created game cache) for Player 1 (Red) at (Center of DUMMY RESTORE POINT <gen>) facing 90.00
Set Twarokk = (Last restored unit)
Set AttributeBonusPoints = (Load AttributeBonusTwarokk of Status1 from YourCache)
Unit - Set level of Attribute Bonus (Another) for Twarokk to AttributeBonusPoints
Game Cache - Save (Last created game cache)



----


And i don't think the problem is with the trigger that run the trigger of the map 1, because the problem only happens with the attribute bonus ability...

Someone have a idea? :eekani:
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
All object editor data that is shared between maps should be created in the campaign editor.

Open campaign editor and select custom data. A view similar to object editor comes up. Well, it is object editor, but for campaign data. You should have created your things there.

All campaign data will be displayed in blue, all map-spesific data in purple.

The ability id of the ability is A000 in map 1, in map 2 it is A00S. Not good. It tries to load the wrong ability.
 
Level 4
Joined
Feb 25, 2010
Messages
73
i already did that... but because of weird bugs (that even created another post here), the people recommend me not use the campaign editor and use only the object editor of each map..

and, if it was buggy like you say, why this ONLY happens with the attribute bonus ability? (the other abilities work perfectly...)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Cause it does not have a common ability identifier between the 2 maps? It points to attribute bonus in map 1 but the same identifier points to some other ability in map 2.

Thus why it is recommended to use the campaign editor as that garuntees the abilities made in it are shared between all maps with the same identifiers.
 
Level 4
Joined
Feb 25, 2010
Messages
73
I ctrl+c and ctrl+v the edited abilities i have done in both maps... but, yet, it don't work.

EDIT: okay, something REALLY strange now... I tried, like a test, utilizing the DEFAULT ability 'Attribute Bonus' in the Hero and... It unexpectly worked perfectly... Like the other abilities

So... We can say that there is something wrong when you EDIT the 'Attribute Bonus' ability? (i created a edited ability with six levels and, each level, 4 points of attribute)

But, i will not use the default 'Ability Bonus' for nothing more, then, i think it is good use it in the place of the ''Ability Bonus (Another)''

However... Yet is strange why, when you edit, it don't work (and it happens only with this skill... My others edited skill worked perfectly... :eekani:)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I ctrl+c and ctrl+v the edited abilities i have done in both maps... but, yet, it don't work.
What does that have to do with keeping them having the same identifier? Are you aware that when adding abilities to a map it finds the nearest free identifier following WE built in rules even when copying (ignores the identifier that the ability had from the copy source).

Thus an ability might be 'A001' in one map but 'A02A' in another. This will cause a continuity error.

If it still does not work, I sujest you store the ability level in the gamecache separatly and then set the ability level when it gets reloaded. If that does not work try waiting. If it still does not work, test if you can even adjust the level of any attribute bonuse ability on any map.
 
Status
Not open for further replies.
Top