Tutorial Guide for Save Load Code

Chocobo

White-Flower
Reaction score
409
i mean in game starts u load ur char then u cant load agien but in his tut u can load many times

Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SaveLoad[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Game - (Player group(Triggering player)) for 30.00 seconds the text: You have loaded you...
            Else - Actions

This at bottom of load...


Code:
SaveLoad[(Player number of (Triggering player))] = True

This at end...
 
D

devil

Guest
Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SaveLoad[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Game - (Player group(Triggering player)) for 30.00 seconds the text: You have loaded you...
            Else - Actions

This at bottom of load...


Code:
SaveLoad[(Player number of (Triggering player))] = True

This at end...
so with the true should i change to the 30.00 seconds to like 10 or can i just do they can only load once.
 

Vulcansurge

Ultra Cool Member
Reaction score
27
First, only do it if you feel you have time... Don't loose any sleep about whether you can do it or not...
 

C-Death

I love you
Reaction score
45
Lol choco i remember my first post ever on this forum was about a save/load code and ur the person who helped me. Good job with this one!
 
L

LoOpedd)GeR_

Guest
hmmm really good thing i read all 5 times and made all in wc3 editor like you said but i get an error ingame...

Error:Hero not Found!

Well i checked the Local variables

I made first 1 Savable Hero

Name of hero : Pandaren-Brauenmeister

HeroType_1: Pandaren-Brauenmeister

And added him to the varriable list but still it occurces an error

can some1 help?
 

Chocobo

White-Flower
Reaction score
409
HeroType_1: Pandaren-Brauenmeister

HeroType_1 is not a variable used in the script. It uses an array variable with the name "HeroType".

And Hero (again an array variable) must be defined.

For instance (if you use a unit to train a hero) :

Code:
Detect Hero
    Events
        Unit - Summoner 0001 <gen> Finishes training a unit
    Conditions
        ((Trained unit) is A Hero) Equal to True
    Actions
        Set Hero[(Player number of (Owner of (Trained unit)))] = (Trained unit)
 
L

LoOpedd)GeR_

Guest
right this was my problem down there:

Code:
Detect Hero
    Events
        Unit - Summoner 0001 <gen> Finishes training a unit
    Conditions
        ((Trained unit) is A Hero) Equal to True
    Actions
        Set Hero[(Player number of (Owner of (Trained unit)))] = (Trained unit)

I had to change it like this:

Code:
Detect Hero
    Events
        Unit - Ludibrium Tavern 0002 <gen> Sells a unit
    Conditions
        ((SoldUnit) is A Hero) Equal to True
    Actions
        Set Hero[(Player number of (Owner of (Sold Unit)))] = (Sold Unit )

Now it woks fine for me thx...

But i got 1 more question:

How can i Setup that I can only load 1 hero into the game because i tested it a bit and i copy+pasted the code and then i had like 20 pandaren-braumeister on 1 spot.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top