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

[Trigger] Disable?

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have tried to make it so that when a certain structure is built, it is no longer available to build. I've succeeded in this, however, A leak occurs and if there is two units building the same structure at the same time both of them finished. Ive tried making one of them stop through ordering the unit, to no avail. And im unable to limit the training of that certain unit to one.Any help?
 
Level 9
Joined
Jun 7, 2008
Messages
440
This will not work, as it is a structure. It needs to be constructed, not trained. This is what i have thus far:
  • Events
    • Unit - A unit owned by Player 1 (Red) Finishes construction
    • Unit - A unit owned by Player 2 (Blue) Finishes construction
    • Unit - A unit owned by Player 3 (Teal) Finishes construction
    • Unit - A unit owned by Player 4 (Purple) Finishes construction
    • Unit - A unit owned by Player 5 (Yellow) Finishes construction
    • Unit - A unit owned by Player 6 (Orange) Finishes construction
    • Unit - A unit owned by Player 7 (Green) Finishes construction
    • Unit - A unit owned by Player 8 (Pink) Finishes construction
    • Unit - A unit owned by Player 9 (Gray) Finishes construction
    • Unit - A unit owned by Player 11 (Dark Green) Finishes construction
  • Conditions
    • ((Unit-type of (Constructed structure)) Equal to Foodless Bank)
    • lightps Less than 2.00
  • Actions
    • Player Group - Add (Owner of (Constructed structure)) to bankgroup
    • Set Banker = (Banker) + 1
    • Player - Make Foodless Bank Unavailable for training/construction by (Triggering player)
This is what i have. I have another trigger which gives income to the playergroup. I also have another trigger which when this structure dies, Its made available again. Hope this helps
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
  • Events
    • Unit - A unit owned by Player 1 (Red) Starts construction
  • Conditions
    • ((Unit-type of (Constructed structure)) Equal to Foodless Bank)
  • Actions
    • Player - Make Foodless Bank Unavailable for training/construction by (Triggering player)
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Unit-type of (Constructed structure)) Equal to Foodless Bank)
  • Actions
    • Player - Make Foodless Bank Available for training/construction by (Triggering player)
The problematic trigger: upon canceling a construction, the cancelled building is removed and it's Unit-type cannot be detected
  • Event
    • Unit - A unit cancels construction
  • Actions
    • Player Group - pick (All players)
      • If( Number of units in (Units of type (Foodless bank) owned by (Picked player) ) equals 0
        • Player - Make Foodless Bank Available for training/construction by (Triggering player)
 
Level 9
Joined
Jun 7, 2008
Messages
440
Im dumb. Sorry.
@ Mort
The triggers your provided weren't quite what i was looking for. The top two i already had, though you have a leak, it should be:
  • Events
    • Unit - a unit dies
  • Conditions
    • (Unit-type of (dying unit)) equal to foodlessbank
  • Actions
    • Player - Make Foodless Bank Available for training/construction by (Owner of (dying unit))
And the last one has no pretense what-so-ever. The object has to be phiscally cancelled before the trigger fires, unless i miss my guess. Thanks for your help anyway Mort.
@ Watermelon_1234
The trigger wouldn't work because the structure is unavailable at the start. There are a few events leading up to it. I reconfigured it to limit the training for when the event occurs. THANKS ALOT! IT WORKS :) +rep
 
Status
Not open for further replies.
Top