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

Is it possible to make unit x unavailable for all players?

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hi i got many units and all players can train them so there is a lot of work with tiggers i would like to make one tigger that doesnt allow unit x to be trained by all players. im using tigger make unit x unaviable to be trained by player red. but how do i make it all players instead of player red? if i have to make some varriable then please explain me everything excatly! because im not good at tiggering and making varriables. if u explain everything excatly there is chance i might do it
 
Level 5
Joined
Jul 18, 2010
Messages
159
Show your trigger, it will be easier to help.
If you're able to make it unavilable for player red, why can't you do the same for 11 other players. If you don't want to copy and paste same trigger 12 times you can also use loop.

Show me your trigger, I'll try to help.
 
Level 1
Joined
Sep 17, 2017
Messages
5
Well this can work, just change the condition, solds and sells to train and I think it will works =D.
Code:
Events
    Unit - A unit Sells a unit
Conditions
    ((Sold unit) is A Hero) Equal to True
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
.o/.
 
Level 11
Joined
Jul 17, 2013
Messages
544
Show your trigger, it will be easier to help.
If you're able to make it unavilable for player red, why can't you do the same for 11 other players. If you don't want to copy and paste same trigger 12 times you can also use loop.

Show me your trigger, I'll try to help.
Cannot give you more cuz im on mobile phone now event is map instilization conditions are empty and actions looks like this,
  • Player - Make vicker Unavailable for training/construction by Player 1 (Red). hmm but wont loop lag game of if i put 30 tiggers with units to loop btw i wanną disable them by tigger so i can enable them to train by tigger later
 
Level 5
Joined
Jul 18, 2010
Messages
159
Cannot give you more cuz im on mobile phone now event is map instilization conditions are empty and actions looks like this,
  • Player - Make vicker Unavailable for training/construction by Player 1 (Red). hmm but wont loop lag game of if i put 30 tiggers with units to loop btw i wanną disable them by tigger so i can enable them to train by tigger later

Some loops won't lag your map. Trigger posted by Silver_Nugget will do the job. It's only one loop. Even if you want to do this for 30 units, it won't lag, just take care of memory leaks and don't make any never-ending loop and you're fine.

If you still need help, feel free to ask, just give us more information like when do you want to make the unit unavilable (what event triggers it)
If you want to learn how to trigger, check out the tutorials section of this forum.
Cheers
 
Status
Not open for further replies.
Top