• 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.

get Map name trigger

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
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 64
Joined
Jan 18, 2005
Messages
27,258
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