Limiting 1 hero-type for ALL players

luckbox

New Member
Reaction score
1
Does anyone know how to make it so its Limiting 1 hero-type for ALL players
not simplying using the -pick all player and limit hero for picked player trigger (i have that atm)

i want it so - similar to Dota,
where if you train a hero from ur alter (or hire from tavern) you are the only player with that hero, and u can have multiple heros types.

thanks.
 

tachiKC

New Member
Reaction score
3
I have actually been trying to figure this out myself to no avail. +rep to anyone who can help us out.
 

Hellohihi

New Member
Reaction score
42
Go to advance, gameplay constants.

In the field, Techtree - Dependancy Equivalents - Hero.

Remove all units from that field, and then add ALL of the heroes you have in your map to it.

Trigger:
  • Events
    • Time - Elapsed game time is 0.1 seconds
    • Conditions
    • Actions
      • For each integer A - 1 to 12 - do actions:
        • Player - Limit training of Heroes to 1 for Player(Integer A)
 

windale5

New Member
Reaction score
2
i have

i ahve a random hero arrary in my map and when i pick option all random will this affect it?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Nope ... But you can use this:

Trigger:
  • Limit Heroes
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is A Hero) Equal to True))) Equal to 2
    • Actions
      • Unit - Remove (Triggering unit) from the game


Haven't tested though :S
 

windale5

New Member
Reaction score
2
ok

i have all random mode and 12 people automatically get 1 hero each will this affect it also what happens if u just keep randoming until u run out of heroes. do i also have to use the gamplay constatnt of limiting heroes or is that for taverns only.
 

luckbox

New Member
Reaction score
1
Hellohi, that its just limiting each player to 1 hero ..
and Komaquin that trigger doesnt look like it will work in the way i need it to..

thanks for trying anyways, ill keep looking
 

SkateuUp

Member
Reaction score
4
You have to add all heroes as variables to another variable and so forth its complicated if you are going for a DoTA like -ar feel. i suggest lookin at the DoTA Template by Acehart it has that mode in it.
 

LordXavier

TH.net Regular
Reaction score
16
you could try this. Temp_Ugroup is a unit group variable and Temp_Pgroup is a player group variable.
Trigger:
  • Limiting Heroes
    • Events
      • Unit - A unit Sells a unit
      • Unit - A unit Finishes training a unit
    • Conditions
      • ((Sold Unit) is A Hero) equal to True
      • ((Trained Unit) is A Hero) equal to True
    • Actions
      • Set Temp_Ugroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in Temp_Ugroup and do (Actions)
        • Loop - Actions
          • Neutral Building - Remove (Unit-type of (Sold Unit)) from all marketplaces
      • Custom Script: call DestroyGroup (udg_Temp_Ugroup)
      • Set Temp_Pgroup = (All players)
      • Player Group - Pick every player in Temp_Pgroup and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of (Trained unit) Unavailable for training/construction by (Picked Player)
      • Custom Script: call DestroyForce (udg_Temp_Pgroup)
 

Lightstalker

New Member
Reaction score
55
A unit sells a unit
Unit sold is hero = to true
remove sold unit from triggering unit

Important: make sure your Tavern has the "Sell Units" ability. If the above trigger still does not work, you may have to add the units via trigger to the Tavern during Map Initialization using "Add UnitType to MarketPlace".

Man, what's with everyone posting super long and complicated triggers :S... and why does everyone have red rep?
 

LordXavier

TH.net Regular
Reaction score
16
A unit sells a unit
Unit sold is hero = to true
remove sold unit from triggering unit

Important: make sure your Tavern has the "Sell Units" ability. If the above trigger still does not work, you may have to add the units via trigger to the Tavern during Map Initialization using "Add UnitType to MarketPlace".

Man, what's with everyone posting super long and complicated triggers :S... and why does everyone have red rep?

With what you did, the remove sold unit from triggering unit, all that does is remove the hero, not prevent it from being sold/trained, therefore wasting the money of whoever bought it.
my trigger i posted wont work unless the buildings that sell heroes have the "Sell Unit" ability, like Lightstalker said. My rep is red cuz of a double post a long time ago :banghead:
 

luckbox

New Member
Reaction score
1
Thx lord, ill try that , and ill see what i come up with

on another notE: i just re read my original post, i shouldnt have mentioned dota, i meant 'similar' as in 1 hero-type her player. not the game play or anything like it.
basically, its melee type game with a huge amount of heros to choose from and some races can choose 3 while others can choose 6.. andi want only 1 hero type during the game. eg: not having 5 pally's from 5 different players

thanks
 

LordXavier

TH.net Regular
Reaction score
16
No. The Hero cannot be trained/sold if it is removed from the building that sells it. :nuts:

oh i understand what you meant, but the way you showed it it didn't make any sense to me

Thx lord, ill try that , and ill see what i come up with

on another notE: i just re read my original post, i shouldnt have mentioned dota, i meant 'similar' as in 1 hero-type her player. not the game play or anything like it.
basically, its melee type game with a huge amount of heros to choose from and some races can choose 3 while others can choose 6.. andi want only 1 hero type during the game. eg: not having 5 pally's from 5 different players

thanks

np
 

windale5

New Member
Reaction score
2
it a neutral building

its a neutral build but when i press all random mode a hero appears immediately. Heres the trigger
Trigger:
  • AR Copy
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
      • (Clicked dialog button) Equal to AR
    • Actions
      • Game - Display to (All players) the text: ALL RANDOM was sele...
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set L = ((Picked player) start location)
          • Unit - Create 1 RANDOM_HERO_ARRAY[(Random integer number between 1 and NUM_HEROES)] for (Picked player) at L facing Default building facing degrees
          • Player - Add -1900 to (Picked player) Current gold
          • Hero - Create Scroll of Town Portal. and give it to (Last created unit)
          • Hero - Create Jaood's Amulet of Power and give it to (Last created unit)
          • Hero - Create Boots of Speed and give it to (Last created unit)
          • Custom script: call RemoveLocation(udg_L)
      • Countdown Timer - Destroy (Last created timer window)
      • Trigger - Run Create Taverns Trigger <gen> (checking conditions)
      • Unit - Unpause all units
      • Trigger - Turn off HOST AFK 2 <gen>
 

LordXavier

TH.net Regular
Reaction score
16
its a neutral build but when i press all random mode a hero appears immediately. Heres the trigger
Trigger:
  • AR Copy
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
      • (Clicked dialog button) Equal to AR
    • Actions
      • Game - Display to (All players) the text: ALL RANDOM was sele...
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set L = ((Picked player) start location)
          • Unit - Create 1 RANDOM_HERO_ARRAY[(Random integer number between 1 and NUM_HEROES)] for (Picked player) at L facing Default building facing degrees
          • Player - Add -1900 to (Picked player) Current gold
          • Hero - Create Scroll of Town Portal. and give it to (Last created unit)
          • Hero - Create Jaood's Amulet of Power and give it to (Last created unit)
          • Hero - Create Boots of Speed and give it to (Last created unit)
          • Custom script: call RemoveLocation(udg_L)
      • Countdown Timer - Destroy (Last created timer window)
      • Trigger - Run Create Taverns Trigger <gen> (checking conditions)
      • Unit - Unpause all units
      • Trigger - Turn off HOST AFK 2 <gen>

I find one problem with that one, there's a chance that multiple players will get the same hero, if you want to put in an All Random mode, try using SD_Ryoko's, it's with the attachments at the bottom of this. it's Ryoko Hero Tavern.w3x, it makes sure that when you do All Random it makes it so the hero cannot be randomed again, if you use and need help changing it to your map i wouldn't mind changing it for you
 

windale5

New Member
Reaction score
2
he uses taverns

I don't use taverns. That what i want to avoid due to people not buying a hero and using the gold to make it unfair for other players. Yes i know there are multiple instances of the same hero. I need them to spawn at once though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top