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
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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