- Joined
- Jan 6, 2008
- Messages
- 2,627
Umm, its basicly a jass problem, so i thought that would be the prefix, as i use custom scripts tho xD...
Okay, i use a load trigger, which looks like this:
The save trigger is like this
But the
Wont load
btw: Big credits to TriggerHappy who gave me the functions xD
Okay, i use a load trigger, which looks like this:
-
Load
-
Events
- Time - Elapsed game time is 0.01 seconds
- Conditions
-
Actions
- Game Cache - Create a game cache from Map1.w3v
- Set GameCache = (Last created game cache)
- Set Point = (Player 1 (Red) start location)
- Game Cache - Restore Hero of Hero from GameCache for Player 1 (Red) at Point facing 0.00
- Set Unit = (Last restored unit)
- Custom script: call RemoveLocation(udg_Point)
- Custom script: call SaveGameCache(udg_GameCache)
- Game Cache - Create a game cache from Map1.w3v
- Set InvCache = (Last created game cache)
- Custom script: call SaveGameCache(udg_InvCache)
- Wait 0.01 seconds
-
For each (Integer A) from 1 to 1000, do (Actions)
-
Loop - Actions
- Custom script: set udg_GameCacheIntegerY[bj_forLoopAIndex] = GetStoredInteger(udg_InvCache, "Y+I2S([bj_forLoopAIndex])", "Category")
- Custom script: set udg_GameCacheIntegerX[bj_forLoopAIndex] = GetStoredInteger(udg_InvCache, "X+I2S([bj_forLoopAIndex])", "Category")
- Custom script: set udg_CacheString[bj_forLoopAIndex] = GetStoredString(udg_InvCache, "S+I2S([bj_forLoopAIndex])", "Category")
-
Loop - Actions
- Wait 0.01 seconds
- Game - Display to (All players) the text: (String(GameCacheIntegerX[12]))
-
For each (Integer A) from 1 to 1000, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CacheString[(Integer A)] Equal to ES
-
Then - Actions
- Game - Display to (All players) the text: :>
- Game - Display to (All players) the text: (String(GameCacheIntegerX[(Integer A)]))
- Set Point = (Point((Real(GameCacheIntegerX[(Integer A)])), (Real(GameCacheIntegerY[(Integer A)]))))
- Destructible - Create a Empty Slot at Point facing 0.00 with scale 0.75 and variation 1
- Set SlotDests[(Integer A)] = (Last created destructible)
- Custom script: call RemoveLocation(udg_Point)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CacheString[(Integer A)] Equal to EX
-
Then - Actions
- Set Point = (Point((Real(GameCacheIntegerX[(Integer A)])), (Real(GameCacheIntegerY[(Integer A)]))))
- Destructible - Create a Exit at Point facing 0.00 with scale 0.75 and variation 1
- Set SlotDests[(Integer A)] = (Last created destructible)
- Custom script: call RemoveLocation(udg_Point)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CacheString[(Integer A)] Equal to DR
-
Then - Actions
- Set Point = (Point((Real(GameCacheIntegerX[(Integer A)])), (Real(GameCacheIntegerY[(Integer A)]))))
- Destructible - Create a Drop at Point facing 0.00 with scale 0.75 and variation 1
- Set SlotDests[(Integer A)] = (Last created destructible)
- Custom script: call RemoveLocation(udg_Point)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call SaveGameCache(udg_InvCache)
-
Events
The save trigger is like this
-
GameCache
-
Events
- Time - Elapsed game time is 0.69 seconds
- Conditions
-
Actions
- Game Cache - Create a game cache from Map1.w3v
- Set InvCache = (Last created game cache)
- Wait 0.01 seconds
-
Destructible - Pick every destructible in Region 004 <gen> and do (Actions)
-
Loop - Actions
- Set InvInt = (InvInt + 1)
- Set GameCacheIntegerX[InvInt] = (Integer((X of (Position of (Picked destructible)))))
- Set GameCacheIntegerY[InvInt] = (Integer((Y of (Position of (Picked destructible)))))
- Game Cache - Store TrackX[InvInt] as (X + (String(InvInt))) of Category in InvCache
- Game Cache - Store TrackY[InvInt] as (Y + (String(InvInt))) of Category in InvCache
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Empty Slot
-
Then - Actions
- Set CacheString[InvInt] = ES
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Exit
-
Then - Actions
- Set CacheString[InvInt] = EX
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Drop
-
Then - Actions
- Set CacheString[InvInt] = DR
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Background
-
Then - Actions
- Set CacheString[InvInt] = B1
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Background
-
Then - Actions
- Set CacheString[InvInt] = B2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Border1
-
Then - Actions
- Set CacheString[InvInt] = BO1
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Border2
-
Then - Actions
- Set CacheString[InvInt] = BO2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Border3
-
Then - Actions
- Set CacheString[InvInt] = BO3
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Border4
-
Then - Actions
- Set CacheString[InvInt] = BO4
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Corner1
-
Then - Actions
- Set CacheString[InvInt] = C1
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Corner2
-
Then - Actions
- Set CacheString[InvInt] = C2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Corner3
-
Then - Actions
- Set CacheString[InvInt] = C3
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Destructible-type of (Picked destructible)) Equal to Corner4
-
Then - Actions
- Set CacheString[InvInt] = C4
- Else - Actions
-
If - Conditions
- Game Cache - Store CacheString[InvInt] as (S + (String(InvInt))) of Category in InvCache
-
Loop - Actions
- Custom script: call SaveGameCache(udg_InvCache)
-
Events
But the
JASS:
Custom script: set udg_GameCacheIntegerY[bj_forLoopAIndex] = GetStoredInteger(udg_InvCache, "Y+I2S([bj_forLoopAIndex])", "Category")
Custom script: set udg_GameCacheIntegerX[bj_forLoopAIndex] = GetStoredInteger(udg_InvCache, "X+I2S([bj_forLoopAIndex])", "Category")
Custom script: set udg_CacheString[bj_forLoopAIndex] = GetStoredString(udg_InvCache, "S+I2S([bj_forLoopAIndex])", "Category")
Wont load
btw: Big credits to TriggerHappy who gave me the functions xD