HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding New Heroes Question

01-19-2004, 03:58 PM#1
Shimrra
If you want to add a fifth Hero how do set it so it works like the normal Heroes? (So you can only make one and it will count as one of your three Heroes?)
01-19-2004, 04:03 PM#2
AllPainful
I set a trigger that stops people from having more than 1 of my custom hero, And a trigger so they can't have more that 3 heroes. Works great.

Need a variable = Integer Array, called CustHeroNum
Code:
Event
    Map Initialization
Condtions
Actions
    Player group - Pick every player in (all players)
        Do loop
            Player - Limit training of Heroes to 3 for player(picked player)
            player - limit training of ([color=blue]****[/color]) to 1 for player(picked player)


To limit it to 3 heroes per player INCLUDING my custom heroes:

Events
    Unit - A unit Sells a unit
Conditions
    Or - Any (Conditions) are true
        Conditions
            ((Sold unit) is in (Units of type [color=blue]****[/color])) Equal to True
Actions
    Set CustHeroNum[slot number of player(owner of sold unit)] = (CustHeroNum[slot number of player(owner of sold unit)] + 1)
    Player - Limit training of Heroes to (3 - CustHeroNum[slot number of player(owner of sold unit)]) for Player(owner of sold unit)


where **** is my custom hero type.

In the first trigger add the following for each of your custom heroes in the loop:
player - limit training of (****) to 1 (picked player)

In the second trigger add the following for each of your custom heroes in the conditions:
((Sold unit) is in (Units of type ****)) Equal to True

NOTE: Change Sold Unit to Trained unit if you put your heroes in an alter, my heroes were sold at a tavern.
01-19-2004, 06:27 PM#3
Shimrra
Thanks, I'll have to try that.