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

how to do -lvl max?

Status
Not open for further replies.
Level 12
Joined
Feb 11, 2008
Messages
809
I am making a whole new type of Hero Line Wars and i need to know how to make the -lvl max (lvl = level) trigger i already have it so it takes the gold needed and it says how many levels were added to the hero but i need the actual trigger that will add the levels (in GUI please).
 
Not really sure what you mean, try explaining better if I got it wrong.

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvl as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -lvl <space here>
    • Actions
      • Hero - Set (Triggering unit) Hero-level to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))))), Hide level-up graphics
 
Level 12
Joined
Feb 11, 2008
Messages
809
heres my trigger that i've done so far:

Events:
Player - Player 1 (Red) types a chat message containing -lvl max as An exact match
Player - Player 2 (Blue) types a chat message containing -lvl max as An exact match
Player - Player 3 (Teal) types a chat message containing -lvl max as An exact match
Player - Player 4 (Purple) types a chat message containing -lvl max as An exact match
Player - Player 5 (Yellow) types a chat message containing -lvl max as An exact match
Player - Player 6 (Orange) types a chat message containing -lvl max as An exact match
Player - Player 7 (Green) types a chat message containing -lvl max as An exact match
Player - Player 8 (Pink) types a chat message containing -lvl max as An exact match
Player - Player 9 (Gray) types a chat message containing -lvl max as An exact match
Player - Player 10 (Light Blue) types a chat message containing -lvl max as An exact match
Conditions:
((Triggering player) Current gold) Greater than or equal to 20000
Actions:
Set lvlmod = (((Triggering player) Current gold) / 20000)
Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Hero - Set (Triggering unit) Hero-level to (0 + 1), Show level-up graphics)
Player - Set (Triggering player) Current gold to ((((Triggering player) Current gold) - (lvlmod x 20000)) + 0)
Game - Display to (Player group((Triggering player))) the text: ((String(lvlmod)) + lvl added to hero)

but i cant figure out why it wont add the levels.

as in how to add as many level's as you can with the gold you have.
 
Level 8
Joined
Aug 3, 2008
Messages
391
Yeah, what's with the (0 + 1)?? Could be the source of all your problems. Shouldn't it be this?

  • Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics
Or...

Maybe you haven't modified the max level heroes can reach?

Select Gameplay Constants... in the Advanced menu which is in between the Tools and Module menu.

A little window thing should show up, scroll down until you see Hero Maximum Level.

Set the value to your desired max level.
 
Level 12
Joined
Feb 11, 2008
Messages
809
is still isnt working heres my new code:

-lvl max
Events:
Player - Player 1 (Red) types a chat message containing -lvl max as An exact match
Player - Player 2 (Blue) types a chat message containing -lvl max as An exact match
Player - Player 3 (Teal) types a chat message containing -lvl max as An exact match
Player - Player 4 (Purple) types a chat message containing -lvl max as An exact match
Player - Player 5 (Yellow) types a chat message containing -lvl max as An exact match
Player - Player 6 (Orange) types a chat message containing -lvl max as An exact match
Player - Player 7 (Green) types a chat message containing -lvl max as An exact match
Player - Player 8 (Pink) types a chat message containing -lvl max as An exact match
Player - Player 9 (Gray) types a chat message containing -lvl max as An exact match
Player - Player 10 (Light Blue) types a chat message containing -lvl max as An exact match
Conditions:
((Triggering player) Current gold) Greater than or equal to 20000
Actions:
Set lvlmod = (((Triggering player) Current gold) / 20000)
Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics
Player - Set (Triggering player) Current gold to ((((Triggering player) Current gold) - (lvlmod x 20000)) + 0)
Game - Display to (Player group((Triggering player))) the text: ((String(lvlmod)) + lvl added to hero)

AND my level max in gameplay constants is 999
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Events:
  • Player - Player 1 (Red) types a chat message containing -lvl max as An exact match
  • Player - Player 2 (Blue) types a chat message containing -lvl max as An exact match
  • Player - Player 3 (Teal) types a chat message containing -lvl max as An exact match
  • Player - Player 4 (Purple) types a chat message containing -lvl max as An exact match
  • Player - Player 5 (Yellow) types a chat message containing -lvl max as An exact match
  • Player - Player 6 (Orange) types a chat message containing -lvl max as An exact match
  • Player - Player 7 (Green) types a chat message containing -lvl max as An exact match
  • Player - Player 8 (Pink) types a chat message containing -lvl max as An exact match
  • Player - Player 9 (Gray) types a chat message containing -lvl max as An exact match
  • Player - Player 10 (Light Blue) types a chat message containing -lvl max as An exact match
  • Conditions:
  • ((Triggering player) Current gold) Greater than or equal to 20000
  • Actions:
  • Set lvlmod = (((Triggering player) Current gold) / 20000)
  • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
  • For each (Integer A) from 1 to lvlmod do (Actions)
    • (Hero - Set (Picked Unit) Hero-level to ((Level of Picked Unit) + 1), Show level-up graphics)
  • Player - Set (Triggering player) Current gold to ((((Triggering player) Current gold) - (lvlmod x 20000)) + 0)
  • Game - Display to (Player group((Triggering player))) the text: ((String(lvlmod)) + lvl added to hero)
You all forgot that when you buy 2 levels, you dont level up 2 times with that trigger, this one should do that (i copyd the trigger from an other post, and added soem things, this is NOT WE stuff, i just wrote what i thougt was there in WE GUI)
 
Level 12
Joined
Feb 11, 2008
Messages
809
  • Events:
  • Player - Player 1 (Red) types a chat message containing -lvl max as An exact match
  • Player - Player 2 (Blue) types a chat message containing -lvl max as An exact match
  • Player - Player 3 (Teal) types a chat message containing -lvl max as An exact match
  • Player - Player 4 (Purple) types a chat message containing -lvl max as An exact match
  • Player - Player 5 (Yellow) types a chat message containing -lvl max as An exact match
  • Player - Player 6 (Orange) types a chat message containing -lvl max as An exact match
  • Player - Player 7 (Green) types a chat message containing -lvl max as An exact match
  • Player - Player 8 (Pink) types a chat message containing -lvl max as An exact match
  • Player - Player 9 (Gray) types a chat message containing -lvl max as An exact match
  • Player - Player 10 (Light Blue) types a chat message containing -lvl max as An exact match
  • Conditions:
  • ((Triggering player) Current gold) Greater than or equal to 20000
  • Actions:
  • Set lvlmod = (((Triggering player) Current gold) / 20000)
  • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
  • For each (Integer A) from 1 to lvlmod do (Actions)
    • (Hero - Set (Picked Unit) Hero-level to ((Level of Picked Unit) + 1), Show level-up graphics)
  • Player - Set (Triggering player) Current gold to ((((Triggering player) Current gold) - (lvlmod x 20000)) + 0)
  • Game - Display to (Player group((Triggering player))) the text: ((String(lvlmod)) + lvl added to hero)
You all forgot that when you buy 2 levels, you dont level up 2 times with that trigger, this one should do that (i copyd the trigger from an other post, and added soem things, this is NOT WE stuff, i just wrote what i thougt was there in WE GUI)

How did you do the Hero-level of picked unit +1 etc
 
Level 9
Joined
Apr 7, 2008
Messages
176
LOL, ok, you "SET" your heroes level to 0 then +1. You need to set its level to "Current Level of Hero" then +1.

If that still dont do it, check out my Herolinewar I made it has the trigger you need. Its DBZ :)

Ok, sorry. Didnt see that there were more pages.
 
Last edited:
Status
Not open for further replies.
Top