- Joined
- Jan 28, 2013
- Messages
- 94
I really want to master game caches. However it never seems to load properly for me! I followed this tutorial: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/game-caches-6273/ and did as it was said. However when I tested to transfer from one map to another, nothing happened. I put in a few debug messages and it became clear that the program executed the triggers but it only returned null. For example the gold property, once the trigger had run I lost 500 gold instead of setting my current cold to 500! The Proper name also returned a (null) message.
How should I solve this?
Map 1 triggers:
How should I solve this?
Map 1 triggers:
-
Game Cache
-
Events
-
Time - Elapsed game time is 5.00 seconds
-
-
Conditions
-
Actions
-
Game Cache - Create a game cache from Maps\Custom RoC maps\Test1.w3x
-
Set Hero1Red = (Last created game cache)
-
Game Cache - Save Hero1Red
-
Trigger - Run Store Hero <gen> (ignoring conditions)
-
Game - Display to (All players) the text: Debug - Archive cre...
-
-
-
Store Hero
-
Events
-
Conditions
-
Actions
-
Game Cache - Store Paladin 0001 <gen> as Paladin of Heros in Hero1Red
-
Game Cache - Save Hero1Red
-
Trigger - Run Store Gold <gen> (ignoring conditions)
-
Game - Display to (All players) the text: Debug - Hero stored
-
-
-
Store Gold
-
Events
-
Conditions
-
Actions
-
Set PlayerGold = (Player 1 (Red) Current gold)
-
Game Cache - Store PlayerGold as Gold of Resource in Hero1Red
-
Game Cache - Save Hero1Red
-
Trigger - Run Store Name <gen> (ignoring conditions)
-
Game - Display to (All players) the text: Debug - Gold stored
-
-
-
End game
-
Events
-
Unit - A unit enters Region 000 <gen>
-
-
Conditions
-
(Owner of (Entering unit)) Equal to Player 1 (Red)
-
((Entering unit) is A Hero) Equal to True
-
-
Actions
-
Game - Set the next level to Maps\Custom RoC maps\Test2.w3x
-
Game - Save game as SaveFile.w3z and change level to Maps\Custom RoC maps\Test2.w3x (Skip scores)
-
-
-
Create
-
Events
-
Time - Elapsed game time is 2.00 seconds
-
-
Conditions
-
Actions
-
Game Cache - Create a game cache from Maps\Custom RoC maps\Test1.w3x
-
Set Hero1Red = (Last created game cache)
-
Set EnterPont = (Center of Region 000 <gen>)
-
Game - Display to (All players) the text: Debug - Archive cre...
-
-
-
Restore Hero
-
Events
-
Time - Elapsed game time is 5.00 seconds
-
-
Conditions
-
Actions
-
Game Cache - Restore Paladin of Heros from Hero1Red for Player 1 (Red) at EnterPont facing 0.00
-
Set RedHero = (Last restored unit)
-
Custom script: call RemoveLocation(udg_EnterPont)
-
Game - Display to (All players) the text: Debug - Restore Hero
-
-
-
Restore Gold
-
Events
-
Time - Elapsed game time is 5.00 seconds
-
-
Conditions
-
Actions
-
Set PlayerGold = (Load Gold of Resource from Hero1Red)
-
Player - Set Player 1 (Red) Current gold to PlayerGold
-
Game - Display to (All players) the text: Debug - Restore Gold
-
-