- Joined
- May 10, 2008
- Messages
- 1,001
Im making an RPG with save/load... i buy some items with my hero... but then when i load him.. he has the stats on him.. but no armor... Please help 
heres wat it looks like:
Save:
Load:

heres wat it looks like:
Save:
-
[CodeGenSaveItemCount
-
Events
-
Conditions
-
Actions
-
Set Size = 6
-
Set Value = (Number of items carried by code_Unit)
-
-
-
CodeGenSaveItem
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item carried by Unit in slot CodeGenItemIndex) Not equal to No item
-
-
Then - Actions
-
For each (Integer B) from 0 to (CodeItemsSize - 1), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by Unit in slot CodeGenItemIndex)) Equal to CodeItems[(Integer B)]
-
-
Then - Actions
-
Set Size = 6
-
Set Value = (Integer B)
-
Set CodeGenItemIndex = (CodeGenItemIndex + 1)
-
Skip remaining actions
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
Set Size = 0
-
Set Value = 0
-
Set CodeGenItemIndex = (CodeGenItemIndex + 1)
-
-
Load:
-
CodeGenLoadItemCount
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
firstpass Equal to True
-
-
Then - Actions
-
Set Size = 3
-
Skip remaining actions
-
-
Else - Actions
-
-
Set CodeGenItemIndex = Value
-
-
-
CodeGenLoadItem
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CodeGenItemIndex Equal to 0
-
-
Then - Actions
-
Skip remaining actions
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
firstpass Equal to True
-
-
Then - Actions
-
Set Size = 6
-
Skip remaining actions
-
-
Else - Actions
-
-
Set CodeGenItemIndex = (CodeGenItemIndex - 1)
-
Hero - Create CodeItems[Value] and give it to Unit
-
-
Last edited: