- Joined
- Feb 2, 2006
- Messages
- 1,630
I have multiple maps for my modification:
Every chapter can be played in multiplayer, in single player ("Custom Game" ...) and in the single player campaign. My modification replaces the standard campaign menu of Warcraft III and links it to my maps.
I use basically the same files for the custom game maps and the single player campaign maps but with different names: For a custom Game the map is called "Talras1.0.w3x" and for the single player campaign it is simply called "TL.w3x" but in a folder with the version "10".
How can I detect if I am playing the map from file A or from file B?
In the past I had to add a new custom object to the campaign maps and use:
This solution required modifying the object data. It worked because I used custom campaigns in the past and I had to add the object only once in the object data of my custom campaign. Now, I am not using custom campaigns anymore, so I am looking for an easier way where I won't have to modify every single map for the campaign version.
Is there any way to detect the file name/path of t he currently played map? Otherwise, which attribute of a map can be modified more easily to detect a difference?
- Chapter 1
- Chapter 2
- Chapter 3
- ...
Every chapter can be played in multiplayer, in single player ("Custom Game" ...) and in the single player campaign. My modification replaces the standard campaign menu of Warcraft III and links it to my maps.
I use basically the same files for the custom game maps and the single player campaign maps but with different names: For a custom Game the map is called "Talras1.0.w3x" and for the single player campaign it is simply called "TL.w3x" but in a folder with the version "10".
How can I detect if I am playing the map from file A or from file B?
In the past I had to add a new custom object to the campaign maps and use:
JASS:
public static method isCampaign takes nothing returns boolean
// this custom object should only exist in the campaign not in the usual maps
return GetObjectName('h03V') == "IsCampaign"
endmethod
Is there any way to detect the file name/path of t he currently played map? Otherwise, which attribute of a map can be modified more easily to detect a difference?