• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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: 182
Status
Not open for further replies.
Top