- Joined
- Aug 21, 2005
- Messages
- 3,699
I cannot seem to make my triggers work... So, here's what I got and what I need
I've got 9 maps. Every map has 4 entrances, which connect the 9 maps with each others.
I've got a Unit variable, which is my hero.
I've got 4 boolean variables, 1 for each entrance.
When my hero takes e.g. Entrance 1 in map 1, which has to lead to entrance 3 in map 5.
So here is what I do:
Game cache - create new game cache
store Hero as Hero of category in last created game cache
Set variable - Entrance 3 equal to true.
Store boolean (entrance 3) as Entrance 3 of category in last created game cache.
Save last created game cache
In map 5, map initialization says:
create new game cache
Game cache - Reload all data from disk (I cannot seem to import the 'Entrance 3 boolean' another way since there is no action like 'restore boolean variable'...)
If Entrance 1 equal to true, Restore Hero of category in Region 1
Else:
If Entrance 2 equal to true, Restore Hero of category in Region 2
else
If Entrance 3 equal to true, Restore Hero of category in Region 3
Else
Restore Hero of category in Region 4
In this case, my hero should pop up in region 3... This is not happening
One of the reasons I could make up is: I have variables in map 1 (E.g. Hero = unit variable) . I have 100% the same variables in map 5 (e.g. the unit variable is called 'Hero' too). Now I wonder: if I save a boolean of map 1, and load it in map 5, will it overwrite the boolean with the same name, or will it simply not work...
Another question: even if those booleans don't work, why won't my hero spawn in region 4? After all, there's no condition there, exept that the 3 other regions must fail first.
One last thing: I'm not sure if 'Reload all data from disk' means that you import all variables you saved,in your map... If not, how to restore a variable in a map?? If so, what am I doing wrong??
In short:
I have 9 maps, 4 entrances in each one. 1 Unit variable called 'Hero', that is filled in with the hero I'm using in map 1. I've 4 booleans, 1 for each entrance. (called 'Entrance1', Entrance2 and so on).
When you enter Region 1 in map 1, you will load map 5. The Hero must be restored in Region 3. How do I do this. Keep in mind that when you load map 5, depending on from which map you came from, you must spawn in region 1, 2, 3 or 4.
So saying 'restore hero in region 3' in map initialization, will resolve in: the hero will, no matter from where he came, spawn in region 3... So I'll need booleans...
I'll try explaining with more structure in my explanation if this looks too chaotic for you...
Thanks anyway
I've got 9 maps. Every map has 4 entrances, which connect the 9 maps with each others.
I've got a Unit variable, which is my hero.
I've got 4 boolean variables, 1 for each entrance.
When my hero takes e.g. Entrance 1 in map 1, which has to lead to entrance 3 in map 5.
So here is what I do:
Game cache - create new game cache
store Hero as Hero of category in last created game cache
Set variable - Entrance 3 equal to true.
Store boolean (entrance 3) as Entrance 3 of category in last created game cache.
Save last created game cache
In map 5, map initialization says:
create new game cache
Game cache - Reload all data from disk (I cannot seem to import the 'Entrance 3 boolean' another way since there is no action like 'restore boolean variable'...)
If Entrance 1 equal to true, Restore Hero of category in Region 1
Else:
If Entrance 2 equal to true, Restore Hero of category in Region 2
else
If Entrance 3 equal to true, Restore Hero of category in Region 3
Else
Restore Hero of category in Region 4
In this case, my hero should pop up in region 3... This is not happening
One of the reasons I could make up is: I have variables in map 1 (E.g. Hero = unit variable) . I have 100% the same variables in map 5 (e.g. the unit variable is called 'Hero' too). Now I wonder: if I save a boolean of map 1, and load it in map 5, will it overwrite the boolean with the same name, or will it simply not work...
Another question: even if those booleans don't work, why won't my hero spawn in region 4? After all, there's no condition there, exept that the 3 other regions must fail first.
One last thing: I'm not sure if 'Reload all data from disk' means that you import all variables you saved,in your map... If not, how to restore a variable in a map?? If so, what am I doing wrong??
In short:
I have 9 maps, 4 entrances in each one. 1 Unit variable called 'Hero', that is filled in with the hero I'm using in map 1. I've 4 booleans, 1 for each entrance. (called 'Entrance1', Entrance2 and so on).
When you enter Region 1 in map 1, you will load map 5. The Hero must be restored in Region 3. How do I do this. Keep in mind that when you load map 5, depending on from which map you came from, you must spawn in region 1, 2, 3 or 4.
So saying 'restore hero in region 3' in map initialization, will resolve in: the hero will, no matter from where he came, spawn in region 3... So I'll need booleans...
I'll try explaining with more structure in my explanation if this looks too chaotic for you...
Thanks anyway