Tutorial Guide for Save Load Code

S

Solidhadriel

Guest
u dont need to respond like i owe u now im not gonna help

I don't get what you mean by 'i owe u', however posting that your not going to help - Well you shouldn't have posted period if you were going to say that.

Now, back on topic - Doing some more indepth research on the -Save system, I am still unable to soundly save and load my characters because there is something I can't find, or it's not set, or something..I just don't get what I'm forgetting to update/change...

I still don't understand this line...
The Save Code can not work if Hero[(Player number (Triggering player))] Variable is not defined.
 

Chocobo

White-Flower
Reaction score
409
master maste said:
Quote: hey Chocobo how did you make a variable for storing gold, or how would you?

Double Quote: sorry I just thought being a save/load code it would save gold. . .

If you want a Save Load code that saves Gold and Wood, I recommand you to read the Tutorial and to use Effane's Triggers located here :
http://www.thehelper.net/forums/sho...?t=37153&page=1
http://www.thehelper.net/forums/att...tachmentid=5830


The Save Code can not work if Hero[(Player number (Triggering player))] Variable is not defined.

Must be defined when your hero you want be savable is created.
The Save Trigger works fully with that, if it has no value, it can not work.
 
S

Solidhadriel

Guest
So is that the Hero Variable? If I understand this correctly...

Your talking about a Variable[Subscript]. Now, the Variable in this case is Hero. The subscript is PlayerNumber OF Triggering Player. What am I defining when I make my heros? Do I set the variable number of Heros to something?

Edit: Where the heck to I define this? Or is it so easy im just making it complicated on myself? lol.
 

Chocobo

White-Flower
Reaction score
409
Solidhadriel said:
So is that the Hero Variable? If I understand this correctly...

Your talking about a Variable[Subscript]. Now, the Variable in this case is Hero. The subscript is PlayerNumber OF Triggering Player. What am I defining when I make my heros? Do I set the variable number of Heros to something?

Edit: Where the heck to I define this? Or is it so easy im just making it complicated on myself? lol.

You fill it with a hero to Hero[player number], for each player.
 
S

Solidhadriel

Guest
Do i do this for each player in the save 'save' trigger?

Edit: Yours doesn't have one for each individual on your test map, is there something im forggeting? The initialize items trigger is setup.

PS: Sorry for the problems +(
 

Chocobo

White-Flower
Reaction score
409
Solidhadriel said:
Do i do this for each player in the save 'save' trigger?

Only one hero per slot, ..

Code:
Hero[1] = Player 1
Hero[2] = Player 2
Hero[3] = Player 3
Hero[4] = Player 4
Hero[5] = Player 5
Hero[6] = Player 6
Hero[7] = Player 7
Hero[8] = Player 8
Hero[9] = Player 9
Hero[10] = Player 10
Hero[11] = Player 11
Hero[12] = Player 12

Get it? You fill the value to the desired unit when it gets created. Normally you can do it alone.
 
S

Solidhadriel

Guest
Oh I get it!!! But wait..Still a question to ask... Where do I set the Heros to players?
 

Chocobo

White-Flower
Reaction score
409
Solidhadriel said:
Oh I get it!!! But wait..Still a question to ask... Where do I set the Heros to players?

"IF" not clear :

Code:
[B]Hero[1] = Player 1's Hero
Hero[2] = Player 2's Hero
Hero[3] = Player 3's Hero
Hero[4] = Player 4's Hero
Hero[5] = Player 5's Hero
Hero[6] = Player 6's Hero
Hero[7] = Player 7's Hero
Hero[8] = Player 8's Hero
Hero[9] = Player 9's Hero
Hero[10] = Player 10's Hero
Hero[11] = Player 11's Hero
Hero[12] = Player 12's Hero[/B]
 
S

Solidhadriel

Guest
No no, hehe..I DO get it.

Now, what my question was asking..Do I set this up in the Map Initialization?
 

Drakens

New Member
Reaction score
7
I think your prblem is you don't set the player's heros, you have to set them when each player chooses one.
In example if you have regions for select heros:
A unit enters (Region HeroX)
Create 1 HeroX for owner of entering unit at point...
Set Hero[(Owner of(Triggering unit)]= Las created unit
(simplified)
 
S

Solidhadriel

Guest
Drakens said:
I think your prblem is you don't set the player's heros, you have to set them when each player chooses one.
In example if you have regions for select heros:
A unit enters (Region HeroX)
Create 1 HeroX for owner of entering unit at point...
Set Hero[(Owner of(Triggering unit)]= Las created unit
(simplified)

OHH! I DEFINITELY get it now. Thank you Drakens very much! Alright so my situation, (Lets see if I get this right...) I'm using a tavern...so..

Event: Player Creates Unit (Or something, i'm at school right now..so these aren't the exact triggers..)
Actions: Set Hero[(Owner of(Triggering unit)]= Las created unit

Then, the save/load code should work eh?
 
S

Solidhadriel

Guest
I FIGURED IT OUT!!! YES!!!

Ok...So this whole time I thought I was doing something wrong..Well you know what?

Tavern: Sells Units.
Trigger: Owner of trained unit.

Buy Hero == Sold Unit.

Sold Unit != Trained Unit.

Trigger != Functional.

OK for those of you who don't understand that gibberish there... I was using a tavern, a tavern sells units, it does not train units..(took me long enough to find out.) So all in all, the whole reason this system would NOT work is because my tavern was selling my units and not training them. UGH! STUPID! Well yeah, thanks everyone who put in tips and hints for helping me get me lame system to work. It now works...HURRRAYY!
 

chewett

New Member
Reaction score
0
what ois the link that will send you to effanes save/load code

the one n page 2 does not work it automatically goes to the main page

+ rep for Chocobo
 
N

NuBy

Guest
Some Error..

I've been playing around with Chocobo's Save/load code.. and ive found out that there is a little error.. because even though i did type the wrong code for my hero, it still gave me the hero. So just say a random code:
acaagu8g6gd4srtgt5
and i type.
acaagu5ydg9hfgdh6

(I made the random code up)

it still gives my hero.. so is there a way to fix it?
 
B

Beelzebubson

Guest
I was wondering how i can modify your code so it saves just 1 or 2 integer variables. I tried editing the gold and lumber part but when i did it made the code stop working... so... yea thx if someone can help.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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