Save/load system compatable?

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
I've searched the forum and there are a lot of questions on save/load systems, but none of them that I found answered the question I have.

Which save/load system should I use if I'm using The Witcher's Advanced Equipment System Not all of them seem to support more than what the hero is carrying in his 6 slots.

And how would I set up the save/load system to look at the items on the 2nd unit?


Thanks for any info.
 
It can be dont since you can get the ability ids with this function

JASS:
function GetEquipItemID takes unit u, integer class returns integer
    local Inventory dat = LoadInteger(h,GetHandleId(u),1)
return dat.Item[class]
endfunction

loop it like this

JASS:
loop
    exitwhen index >=  itemclasses //Remove private on this global
    set ID = GetEquipItemID("Unit",index)
    //Do stuff like add the "Code" to the save/load string
    set index = index + 1
endloop

thou since its 9 item classes it will be alot of code ^^, could use some advance math to shorten it (saw some guy who tried to make something like that here on hive)

EDIT:

maybe next time read the documentation? :P
JASS:
//----- For SAVE/LOAD systems use these functions: -----
//
// use this function to get the index of the equipped item of class xyz (save these values in your load code) ...
// GetEquipItemIndex (u, class) it returns an integer
// unit integer
//
// ... and this function to equip a new item by this index (which you read out from the load code)!
// EquipItemByID (u, index)
// unit integer
//
//
// to implement this system, just copy this trigger in your map
// it requires jngp to work well
//
 
Last edited:
Status
Not open for further replies.
Back
Top