HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Cache

06-29-2005, 02:40 PM#1
Thunder_Eye
I made an system with 3 maps, map 1,map 2,map 3
and regions to the opposite maps in every map.
Well, when I am in map one and go to map 2, I have to save an integer or string from what map I came from.

And then I store the integer in the game cache.
Now.. Ive tested some stuff and cant figure out how to load the integer.
This is what I use

UPDATED:

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Game Cache - Reload all game cache data from disk
        Game Cache - Create a game cache from Test.w3v
        Set Test = (Last created game cache)
        Set Integer = (Load Integer of Integers from Test)
        Trigger - Run from <gen> (checking conditions)

Code:
from
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Integer Equal to 2
            Then - Actions
                Game Cache - Restore Thrall of Heroes from Test for Player 1 (Red) at (Center of from map 2 <gen>) facing 0.00
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Integer Equal to 3
                    Then - Actions
                        Game Cache - Restore Thrall of Heroes from Test for Player 1 (Red) at (Center of from map 3 <gen>) facing 0.00
                    Else - Actions
                        Do nothing
        If ((Last restored unit) Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
        Unit - Create 1 Thrall for Player 1 (Red) at (Center of new <gen>) facing Default building facing degrees
        Game Cache - Clear Test

Code:
to 2
    Events
        Unit - A unit enters To map 2 <gen>
    Conditions
    Actions
        Set Integer = 1
        Game Cache - Clear Test
        Game Cache - Store (Entering unit) as Thrall of Heroes in Test
        Game Cache - Store Integer as Integer of Integers in Test
        Game Cache - Save Test
        Game - Set the next level to Maps\Test\Test\2.w3x
        Game - Victory Player 1 (Red) (Skip dialogs, Skip scores)

Code:
to 3
    Events
        Unit - A unit enters To map 3 <gen>
    Conditions
    Actions
        Set Integer = 1
        Game Cache - Clear Test
        Game Cache - Store (Entering unit) as Thrall of Heroes in Test
        Game Cache - Store Integer as Integer of Integers in Test
        Game Cache - Save Test
        Game - Set the next level to Maps\Test\Test\3.w3x
        Game - Victory Player 1 (Red) (Skip dialogs, Skip scores)






Why doesnt it work??

EDIT: Ive also tried to change

Code:
Set Integer = (Load Integer of Integers from Test)

and then checked the Integer with "Integer Equal to 2"
07-02-2005, 10:52 PM#2
Thunder_Eye
Cant anyone answer this? really?

(Sry for double posting)
07-03-2005, 11:16 PM#3
Vexorian
No events on second trigger?

And use [code instead of [quote please
07-04-2005, 12:20 AM#4
harel
I think that you forgot to save your game cache
What you had to do is
Code:
Events
Unit - A unit enters to map 2 <gen>
Conditions
Actions
Set Integer = 1
Game Cache - Clear Test
Game Cache - Store (Entering unit) as Trall of Heroes in Test
Game Cache - Store Integer as Integer of Integers in Test
[b]Game Cache - Save Test[/b]
Game - Set the next level to Maps\Test\Test\2.w3x
Game - Victory Player 1 (Red) (Skip dialogs, Skip scores) 
07-04-2005, 01:20 AM#5
weaaddar
You never initalize test in the second trigger.

as far as how to do that I think its just something Load or Create gamecache in GUI (I don't know I don't use gui.) you don't need to use reload all cache, its only required if you are using save game manipulation.
07-06-2005, 04:16 PM#6
Thunder_Eye
about the Event in the seccond trigger, I have an "run trigger" in the first one, dont know why it doesnt show up.

Also I edited the first post, please check it again.

@harel
Im gonna test save game cache, it might be it.

EDIT: Well, I dont think i still work and now the
Code:
"Waiting for Host"
    Disconnect
appears, in single player!
?..
07-06-2005, 04:22 PM#7
Vexorian
Saving game cache destroys its pointer by the way, so you have to initialize it again after saving
07-06-2005, 04:26 PM#8
Thunder_Eye
What do you mean by that? :\\

EDIT: Updated first post, now contains all triggers.
07-11-2005, 07:44 PM#9
Thunder_Eye
*bump*
07-16-2005, 08:30 AM#10
Thunder_Eye
I said *bump*!
07-16-2005, 10:35 AM#11
Zoxc
Is the Map initialization trigger on all maps?
07-16-2005, 03:34 PM#12
Thunder_Eye
Yeah, should I change it?
07-16-2005, 03:48 PM#13
Zoxc
It shoud be in all maps.

When are this Waiting for host appear?
07-17-2005, 04:09 PM#14
Thunder_Eye
about 2 secs in the game
08-03-2005, 04:51 PM#15
Thunder_Eye
*bump* again