• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Debug Trigger: -levelup

Status
Not open for further replies.
Level 2
Joined
Oct 29, 2010
Messages
18
Hello, im making a map and i need a simple debug trigger for testing my map.
I have made one level up trigger, but i have managed to make one wich the hero go up only level by one and i dont know how to make a trigger that one could type the level he wanted, something like -lvl 25, and he goes to level 25(like the one from dota.

  • Levelup Heroes
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvl as An exact match
    • Conditions
    • Actions
      • Set temp_group2 = (Units currently selected by (Triggering player))
      • Unit Group - Pick every unit in temp_group2 and do (Actions)
        • Loop - Actions
          • Custom script: local unit u = GetEnumUnit()
          • Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics
          • Custom script: set u = null
          • Custom script: call DestroyGroup(udg_temp_group2)
If someone could make this trigger for me, i will be very thankful and +rep will be added for such help.

Thanks.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 049
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvl as A substring
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))))), Hide level-up graphics
EDIT: A bit late it seems, but here's the whole trigger.
 
Level 2
Joined
Oct 29, 2010
Messages
18
Thanks for the help

It worked perfectly as it should, and the trigger was more simpler than mine.
I could even retroced levels, for testing purposes.
Thanks, +rep added to both.
 
Status
Not open for further replies.
Top