• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

get Map name trigger

Status
Not open for further replies.
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.
 
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.
Back
Top