• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

get Map name trigger

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,156
I do not see any native which could possibly do what you are after in WC3. You could store the name of the map as a constant and reference that (so when you update its name for a new version it will change all references).

when some1 edit my map and save it with different name then unknown error will pop up when he play it.
They can just save it as its normal name. WC3 does not stop people calling different map files the same map name,

You may wish to consider SC2.
In SC2, you can get the map name via script. The publishing system also restricts people from uploading any 2 maps with an identical name (so such a system has more meaning).

In the end it is not worth the effort in both games as you can just remove the system from the script.
 
Level 7
Joined
Mar 5, 2009
Messages
254
Wait i dont understand this : You could store the name of the map as a constant and reference that (so when you update its name for a new version it will change all references).Can you explain a bit more please
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,156
JASS:
constant string MAP_NAME = "JASSSCRIPTMAP 1.0"

Now every time you want to reference the map name for example as part of a intro you just need to use the variable MAP_NAME which is of type string. Ofcourse this does not update automatically, in standard WorldEdit atleast.

Via the use of a precompiler script (like LUA which JNGP supports), you might be able to get it to update that variable automatically by actually looking up the map name. Especially if you compare an auto retreived value with a constant you manually enter it could achieve the effect you want. Still this is not very useful for any form of anti map theft as people would just delete the protection system script.
 
Status
Not open for further replies.
Top