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

[Solved] Level-up command problem?

Status
Not open for further replies.
Level 20
Joined
Apr 14, 2012
Messages
2,901
Ok so I've tried to make a level up trigger for my map. I did everything right, didn't I? But I can't figure out what's wrong with my trigger:

  • lvlup
    • Events
      • Player - (Owner of Defender Of Light 0001 <gen>) types a chat message containing -lvlup as An exact match
    • Conditions
      • (Substring((Entered chat string), 1, 7)) Equal to -lvlup
    • Actions
      • Set LV_Temp_Int = (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string))))))
      • Set LV_Group = (Units currently selected by (Triggering player))
      • Unit Group - Pick every unit in LV_Group and do (Actions)
        • Loop - Actions
          • Hero - Set (Triggering unit) Hero-level to ((Hero level of (Picked unit)) + LV_Temp_Int), Show level-up graphics
      • Custom script: call DestroyGroup(udg_LV_Group)
 
Level 4
Joined
Jan 27, 2010
Messages
133
Should be picked unit twice in loop.

Should be substring and in EVENT.

Also, first try without the substring in condition and level, just to make sure that the rest is working.

  • lvlup
  • Events
  • Player - (Owner of Defender Of Light 0001 <gen>) types a chat message containing -lvlup as A SUBSTRING
  • Conditions
  • Actions
  • Set LV_Temp_Int = 1
  • Set LV_Group = (Units currently selected by (Triggering player))
  • Unit Group - Pick every unit in LV_Group and do (Actions)
    • Loop - Actions
      • Hero - Set (PICKED UNIT) Hero-level to ((Hero level of (Picked unit)) + LV_Temp_Int), Show level-up graphics
  • Custom script: call DestroyGroup(udg_LV_Group)
 
Status
Not open for further replies.
Top