• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Hero Tavern with Level requirements?

Status
Not open for further replies.
Level 1
Joined
Jul 10, 2009
Messages
2
I'm trying to create a hero tavern that requires and displays the level requirement when some one mouses over the icon to see that they need the level before they can purchase the selected hero.

Example situation:

You select your starting hero, and begin to PVP in the map. In your hero base is the special hero tavern. When you go into it you'd see new heroes, but the heroes would show they need required level 15 to pick any of them.

Then when that same person hits level 15, they buy their new hero, losing their old one.

Example end.

I'm also going to want to set it so that when they buy their new hero, the new hero is given the levels from the old one. I'm also probobly going to want to know how to transfer the items that the old hero was carrying to the new one, if possible.

Final note, I have no skill with JASS, if triggering is necessary.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
You will need triggers for that
and use some upgrades that are not doing anything

make your heroes require that upgrades
(requires - hero level 15)



  • player has hero lvl 15
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Level of (Leveling Hero)) Equal to 15
      • (Current research level of Hero level 15 for (Owner of (Leveling Hero))) Equal to 0
    • Actions
      • Player - Set the current research level of Hero level 15 to 1 for (Owner of (Leveling Hero))
 
Level 2
Joined
Mar 13, 2008
Messages
24
This is how I would do it...

1) Create a new upgrade based on something you're not going to use. (I'm using Magic Sentry) Give it 15 levels.
2) Create the following trigger...

  • Events
    • Unit - A unit Gains a level
  • Conditions
    • (Hero level of (Leveling Hero)) Equal to 15
  • Actions
    • Player - Set the current research level of Magic Sentry to ((Current research level of Magic Sentry for (Owner of (Leveling Hero))) + 1) for (Owner of (Leveling Hero))
3) Set the requirement for the heroes that you want to require level 15.
4) Add the following trigger...

  • Events
    • Unit - A unit enters (Playable map area)
  • Conditions
    • ((Unit-type of (Entering unit)) Equal to "15Hero#1") or (((Unit-type of (Entering unit)) Equal to "15Hero#2") or ((Unit-type of (Entering unit)) Equal to "15Hero#3"))
  • Actions
    • Hero - Set (Entering unit) Hero-level to 15, Hide level-up graphics
That should make everything work how you want it to.

Hope this helps. ^^
 
Status
Not open for further replies.
Top