System CodeGen - Save and Load

Lobster

Old Fogey ofthe site
Reaction score
90
a
Code:
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Set Hero = (Your first unit))
Custom script:   set udg_Save[udg_SaveCount] = CG_SaveHero(udg_Hero)
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Set Hero = (Your second unit))
Custom script:   set udg_Save[udg_SaveCount] = CG_SaveHero(udg_Hero)

Remember to load them.
wouldnt that cause the hero to be selected twice?
(sucks at this)
 

Sevion

The DIY Ninja
Reaction score
424
Yes, it would because you're picking the same group and setting the variable to the first picked. So, either it'll pick the same unit twice, or it'll sometimes pick the two different units.

It'd be better to just do a loop.
 

Lobster

Old Fogey ofthe site
Reaction score
90
Yes, it would because you're picking the same group and setting the variable to the first picked. So, either it'll pick the same unit twice, or it'll sometimes pick the two different units.

It'd be better to just do a loop.

ty, and i still need help, with that and:
what if the second unit is created through jass as dat.u?
 

LordOfQc

New Member
Reaction score
0
Ok I found the problem. But I have a new question, how do we save ability in spell book with this trigger?
 

aki15

New Member
Reaction score
5
hey guys i have problem ... When i save map it have some errors about custom script in CG....
 

Dark

New Member
Reaction score
0
Hello !
I copied this trigger in my map, but:
That bug for items and level, ex: I'm lvl 175 with 6 ice scroll, I save, I load, and... that give a frost mage lvl 6 with 3 scroll, 3 glove speed, 2 lightning shield, etc...
 
Reaction score
341
Hello !
I copied this trigger in my map, but:
That bug for items and level, ex: I'm lvl 175 with 6 ice scroll, I save, I load, and... that give a frost mage lvl 6 with 3 scroll, 3 glove speed, 2 lightning shield, etc...

Re-download the system, I updated it.
 
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