Warcraft III resources & community, 2003–2006 · archived

A save/load trigger request

5 posts
#1

A save/load trigger request

Im making a melee map that will be very long and i was wondering if there is a way to save all the units and heros on the map. I've tried this.
Save
Events
Player - Player 1 (Red) types a chat message containing -save as An exact match
Conditions
Actions
Game Cache - Create a game cache from OurMap.w3v
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Game Cache - Store ((Picked player) Current gold) as PlayerGold of Category in (Last created game cache)
Game Cache - Store ((Picked player) Current lumber) as PlayerLumber of Category in (Last created game cache)
Game Cache - Store ((Picked player) Food used) as PlayerFoodUsed of Category in (Last created game cache)
Game Cache - Store ((Picked player) Food cap) as PlayerFoodCap of Category in (Last created game cache)
Game Cache - Store ((Picked player) Food max) as PlayerFoodMax of Category in (Last created game cache)
Game Cache - Save (Last created game cache)
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Game Cache - Store (Picked unit) as Unit of Unit in (Last created game cache)
Game Cache - Store (Percentage life of (Picked unit)) as UnitLife of Unit in (Last created game cache)
Game Cache - Store (Percentage mana of (Picked unit)) as UnitMana of Unit in (Last created game cache)
Game Cache - Store (Hero level of (Picked unit)) as HeroLevel of Hero in (Last created game cache)
Game Cache - Store (Hero experience of (Picked unit)) as HeroExp of Hero in (Last created game cache)
Game Cache - Store (Strength of (Picked unit) (Include bonuses)) as HeroSTR of Hero in (Last created game cache)
Game Cache - Store (Agility of (Picked unit) (Include bonuses)) as HeroAGI of Hero in (Last created game cache)
Game Cache - Store (Intelligence of (Picked unit) (Include bonuses)) as HeroINT of Hero in (Last created game cache)
Game Cache - Store (Unspent skill points of (Picked unit)) as HeroUSP of Hero in (Last created game cache)
Game Cache - Store (Proper name of (Picked unit)) as HeroName of Hero in (Last created game cache)
Game Cache - Save (Last created game cache)
Item - Pick every item in (Playable map area) and do (Game Cache - Store (Charges remaining in (Picked item)) as ItemCharges of Item in (Last created game cache))
Game Cache - Save (Last created game cache)
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game





If somebody could help me that would be great.
#2
It looks good, does it work??
#3
BrownSnowIt looks good, does it work??


hahaha :lol:

:mrgreen:


Currently I'm tryin' to use game cache myself.
If i got it workin I will tell you how
#4
You have to be more specific in what you want to do. Why do you need to store all that stuff?
#5
isnt there a save/load function for hero levels and skills already in the site?
and couldned u edit that to save the other stuff?