• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Units Being Removed From Barracks

Status
Not open for further replies.
Level 6
Joined
May 8, 2010
Messages
150
This is probably a simple thing to do, but i cannot find the triggers for it!!

For example, in my map I want a player not to be able to make more than 1 footman.
And after one has been made the footman icon is removed from the barracks and not able to made.

I've seen this done on various games on W3.
Just cant figure out how to do it.

+ rep for helpers ofc.

-pRo
 
Level 11
Joined
Jul 9, 2009
Messages
926
This trigger should work
  • Limit
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Footman
    • Actions
      • Player - Make Footman Unavailable for training/construction by (Owner of (Trained unit))
Hope this helped and Happy Mapping !
 
Level 11
Joined
Jul 9, 2009
Messages
926
well he asked for a trigger of it and its common sense right either way though it works xD
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
@Frotty Why not:
  • init
    • Events
    • Conditions
    • Actions
      • Player Group - Pick all players in (All players) and do:
        • Loop - Actions
          • Player - Limit training of Footman to 1 for (Picked player)
I think he can figure that out, he just didnt find the right native.

well he asked for a trigger of it and its common sense right either way though it works xD
No it doesnt.
He wants to be able to train only 1 footman at a time, meanign when the 1 dies, you can train 1 again.
Yours just deactivates training after the first time.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Frotty - it's true, action 'Player - Limit (...)' is simpler and seals the deal, although Sait'sone could work too if he uses additional trigger:
  • init
    • Events
      • Unit - a Unit dies
    • Conditions
      • (Unit type of (Triggering unit)) Equal to Footman
    • Actions
      • Player - Make Footman Avialble for (Owner of (Triggering unit))
Thats just to clarify the situation that second way is posible too, but its pointless to create two triggers if one action replaces those pretty well.
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
Frotty - it's true, action 'Player - Limit (...)' is simpler and seals the deal, although Sait'sone could work too if he uses additional trigger:
  • init
    • Events
      • Unit - a Unit dies
    • Conditions
      • (Unit type of (Triggering unit)) Equal to Footman
    • Actions
      • Player - Make Footman Avialble for (Owner of (Triggering unit))
Thats just to clarify the situation that second way is posible too, but its pointless to create two triggers if one action replaces those pretty well.

As if I wouldnt know this?
its just another senseless discussion~
And if he doesnt know how to do it and saw it in other maps i just GUES that he wants to limit it and not disable it.
 
Level 11
Joined
Jul 9, 2009
Messages
926
anyway both triggers work but yours is better to end the arguement.
Its also good that I posted the one that disables the training. it MIGHT help him too.
m118.gif
 
Status
Not open for further replies.
Top