• 🏆 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!

My First Hero Isn't Free (Rip-Off..)

Status
Not open for further replies.
Level 2
Joined
Nov 15, 2008
Messages
22
Hey guys.. I just finished completing my custom melee map race. Everything is fine except one thing.. And it is hero related. Well, first of all, my first hero isn't free.. Forcing me to pay 425 gold, and 100 lumber. What a rip-off. And theres another problem, you can also have the same type of hero more than one time. What I mean by this is that lets say I have a a Lich. When I upgrade my Necropolis, I can get another Lich, this ain't good. (Keep in mind I just used examples!)

Anyways, any kind of help is appreciated. Thanks!
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Forcing me to pay 425 gold, and 100 lumber

You have to remove gold and lumber cost in object editor.

60130d1247168112-my-first-hero-isnt-free-rip-off-costs.jpg


What I mean by this is that lets say I have a a Lich. When I upgrade my Necropolis, I can get another Lich, this ain't good. (Keep in mind I just used examples!)

You will have to make it with triggers.

  • Trigger
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Limit training of <Hero> to 1 for (Player((Integer A)))

  • Trigger 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <Hero>
    • Actions
      • Player - Limit training of <Hero> to 1 for (Owner of (Triggering unit))
If you want to limit all heroes to 1, copy this trigger instead of previous.

  • Trigger 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Player - Limit training of (Unit-type of (Triggering unit)) to 1 for (Owner of (Triggering unit))
 

Attachments

  • Costs.JPG
    Costs.JPG
    62.1 KB · Views: 180
Level 7
Joined
Mar 26, 2009
Messages
345
I believe you could go into Game Constants and change/overwrite one of the race's default heroes with yours. This cuts down on some the of the triggers you have to write.

(I think. Someone correct me if I'm wrong - it's been a while.)
 
Level 9
Joined
Oct 7, 2007
Messages
599
No need to change/overwrite - you can add in conjunction with the current list of heroes. Assuming you're using some of the default map initialization triggers to control the hero limit, this should do that trick. This is better than the other solution of removing the gold and lumber costs, as that affects further heroes past the first one.
 
Level 2
Joined
Nov 15, 2008
Messages
22
I got the hero limits working thanks to Child_0f_Bodom, although the first hero still faces the cost requirement. Gameplay Constants don't have anything related to what I'm doing. And I'm not so sure what Angry_Bovine typed, where would I have to add the list of heros onto?

Thanks!
 
Status
Not open for further replies.
Top