• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Save Load?

Status
Not open for further replies.
Level 2
Joined
Oct 20, 2007
Messages
18
I just played Master Crafter's Final Conquest, and noticed that it could save and load your units. What would be the easiest way to do that?

Someone just typed -save and then a thing like "To load your unit, type: -load fpsidajfcni4utposeiuainuopewinriyapoeuysoeifusefuyebpvrewoiurvbhsiery" appeared. :eekani:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I don't think you would like to create a system because its kinda hard, but in case you do it works like this:

You first set all your items/levels/gold/wood or whatever into Strings and Integers (depends how you want it to be).

Then when a player types -save (or whatever you want him to type) you check his inventory/level/gold/wood Etc. and give him the values you set at the start.

Then when a player types -load (or whatever you want him to type....) you check the combinations inside his code and according to them you give him items/levels/gold/wood Etc.

You would most likely NOT want to put easy codes such as "100-98-36-45" for a level 100 with 98 str, 36 agi, and 45 int, because then people would discover it very quickly and just load a uber char such as "1-1000000-1000000-100000" (level 1 with 1mil states lol).
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Here is an example I just made (lol it actualy works, on first try !).

Its buggy when you have multiple items.
To fix it just change from "Hero carrying item type..." to "Item in hero's inventory slot Integer[A] equal to Items[(Integer[A]-1)]" or something like this.
If you ask "why didn't you do it then" its just because im lazy :p

Type Set 1/2/3 (example: Set 1) to set each of the heros to the Heros[x] variable so you can save them.

For example if you type Set 1, you will be able to save the paladin.

Don't take more then 4 power tomes because I made the code to work untill level 5.

[Edit] whops sorry for double.
 

Attachments

  • Save Load test.w3x
    16 KB · Views: 185
Status
Not open for further replies.
Top