• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] is CreateUnitByName bugged?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set uht = (Last created hashtable)
      • -------- -------------------------------------------- --------
      • Set str = paladin
      • Set ut = Paladin
      • Custom script: call SaveInteger(udg_uht, StringHash(udg_str), 0, udg_ut)
      • -------- -------------------------------------------- --------
      • Set str = footman
      • Set ut = Footman
      • Custom script: call SaveInteger(udg_uht, StringHash(udg_str), 0, udg_ut)
      • -------- -------------------------------------------- --------
      • Set str = grunt
      • Set ut = Grunt
      • Custom script: call SaveInteger(udg_uht, StringHash(udg_str), 0, udg_ut)
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing create as A substring
    • Conditions
    • Actions
      • Set str = (Substring((Entered chat string), 8, (Length of (Entered chat string))))
      • Custom script: if HaveSavedInteger(udg_uht, StringHash(udg_str), 0) then
      • Custom script: set udg_ut = LoadInteger(udg_uht, StringHash(udg_str), 0)
      • Unit - Create 1 ut for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
      • Custom script: endif


create paladin
create grunt
create footman
etc.
 

Attachments

  • UnitCreateStringHash.w3x
    12.7 KB · Views: 56
Level 26
Joined
Aug 18, 2009
Messages
4,099
I have the german version and it reacts only on english names. Those are not necessarily the ones you see in object editor though. For example, Hall of the Dead is "necropolis1", Black Citadel "necropolis2".

The name of custom units is "custom_" + rawId, e.g. "custom_h000".
 
Status
Not open for further replies.
Top