abilities wont save using ace harts save/load code!

WC3_map_fan

Member
Reaction score
3
i am using basically ace harts save load code for my map...
and i cant save abilities...
now this isnt ace harts code, its the triggering i have for the abilities, you see; when you pick up an item called that spell it destroys that items and gives you the spell it states.
i am using this triger for that:
Jump 1337
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Jump
Actions
Unit - Add Jump 1337 to (Hero manipulating item)
Wait 0.01 seconds
Item - Remove (Item being manipulated)

now that makes the ability appear on the unit that picks up the item...

but here is the real problem: when i type -save it doesnt save the abilities as well.
please note: i have changed the ability data to read jump and all the other abilities but not a single one of them save.

does this save load code only work for abilities that the hero starts of with?
how do i fix this? because i really want the spells to come usable by picking up the item and then running the trigger from above.

if you know a more effective way then please tell me! i am most thankful for any help i can recieve in this way!
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> it doesn't save the abilities as well

If they are in the abilities array, they save...


However, the load trigger uses:
Code:
For each (Integer SaveCount) from (SaveCount + 1) to TempInteger, do (Actions)
    Loop - Actions
        For each (Integer A) from 1 to Save[(SaveCount + 1)], do (Actions)
            Loop - Actions
                Custom script:   call SelectHeroSkill( GetLastCreatedUnit(), udg_SaveLoad_Abilities[ udg_Save[ udg_SaveCount ] ] )
        Set SaveCount = (SaveCount + 1)

And, well, it assumes we're dealing with Hero skills...


You will have to replace that with
For each (Integer SaveCount) from (SaveCount + 1) to TempInteger, do (Actions)
- Unit Add SaveLoad_Abilities[ Save[ SaveCount ] ] to (Last created unit)
- Unit - Set level of SaveLoad_Abilities[ Save[ SaveCount ] ] to Save[(SaveCount + 1)]
- Set SaveCount = (SaveCount + 1)


Assuming you're using the original "SaveLoad Load Abilities" trigger... :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top