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

Can some one help me recreate this trigger?

Status
Not open for further replies.

Gojira2000

G

Gojira2000

hmm alright then, but I'm really bad at explaining things so ill do my best to explain this trigger

here is what I need the function to do

Ok the orc heroes all share the same altar and character choices and I need it so when a hero trains a hero, that hero can no longer be selected by other players and can no longer pick any other heroes (but the hero can be reselected if the player cancels the training of the hero)
 
Level 10
Joined
Apr 18, 2009
Messages
576
Have you played this map with computers (or real players) occupying all the slots? Does the hero selection still work as you want when doing this? Because what happens is that if you are playing alone as the horde then the full shared units kicks in due to the empty player slots and you can build heroes for the other players with the other players buildings.
 

Gojira2000

G

Gojira2000

yes they still work with or without other players just play the map and go as horde and you'll see what I mean (it's better that you take a look at the function yourself, cause as you can see I'm terrible at explaining things.....)
 
Level 10
Joined
Apr 18, 2009
Messages
576
I did play the map as horde and I did not see exactly what you mean, that's why I'm asking. The orc players do not share the same buildings, it's only automatically shared with full unit control if there are empty player slots. Every orc player has their own set of 3 altars, so they do not share the same buildings.

However, each set of altars do seem to share the logic that if one player orders one of his altars to train a hero, then the other players cannot train that very same hero from their corresponding altar, right? Is this what you're after?

If that is the case, these are the functions you're after if triggering in GUI:

When an altar begins training a hero, disable that hero from being avalible for training by other players:
  • Hero Begins Training Player 1
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Player - Make (Unit-type of (Trained unit)) Unavailable for training/construction by Player 2 (Blue)
      • Player - Make (Unit-type of (Trained unit)) Unavailable for training/construction by Player 3 (Teal)
When an altar calcels training a hero, enable that hero to be trained by other players:
  • Hero Cancels Training Player 1
    • Events
      • Unit - A unit Cancels training a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Player - Make (Unit-type of (Trained unit)) Available for training/construction by Player 2 (Blue)
      • Player - Make (Unit-type of (Trained unit)) Available for training/construction by Player 3 (Teal)
Don't forget to disable these triggers for a player that has finished his training of a hero:
  • Disable Hero Selection Triggers Player 1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Hero Begins Training Player 1 <gen>
      • Trigger - Turn off Hero Cancels Training Player 1 <gen>
These are good examples if players 1, 2 and 3 all have their own version of one or more altars. So player 1 has an altar, player 2 has his version of the same type of altar etc.

Please note that this is just an example for the triggers of player 1. You'll have to make simular triggers for player 2 and 3, right?
 

Gojira2000

G

Gojira2000

oops srry, I was referring to earlier versions of COTH when it only had one altar for each horde player and thanks for helping me out :)
 

Gojira2000

G

Gojira2000

to early to tell im gona have to play around in with it for a while to see if I can get it to work properly and if it doesn't im gona see if I can modify the dota tavern triggers to see if they'll work for my map
 

Gojira2000

G

Gojira2000

Ok I still cannot get this trigger to work so im going to rephrase my question

How do I limit one hero type per game? For example if there are multiple orc players and one of the players choose the farseer then no one else is allowed to make another farseer.
 
Level 10
Joined
Apr 18, 2009
Messages
576
Sorry, my fault for not testing my triggers all the way through before posting them. I understood the concept before and what I posted is what should've solved that problem you just described.

However, turns out that the action:
  • Player - Make (Unit-type of (Trained unit)) Unavailable for training/construction by Player 2 (Blue)
Should be written this way to refer to the proper unit being trained:
  • Player - Make (Trained unit-type) Unavailable for training/construction by Player 2 (Blue)
Same with the corresponding actions for re-enabling the hero for training for each player if someone cancel his/her training.

Other than that, the general concept is still the same with my triggers above.
 

Gojira2000

G

Gojira2000

I got it to work thank you very much for your help and knowledge Licheus :) I would rep you but you disabled it
 
Status
Not open for further replies.
Top