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
 
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.
 
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.
 
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
 
  • 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)
 
  • 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
 
Status
Not open for further replies.
Back
Top