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

[Trigger] Detecting Cargo Hold Capacity

Status
Not open for further replies.
Level 6
Joined
Aug 19, 2007
Messages
109
I have searched far and wide in the hiveworkshop Q's and cannot find this question:
How do you make a trigger where a condition is something like:
"Number of units in cargo hold/transport/etc.. equal to 1-x" I cannot find the condition that does that.:cry:
I need to make it so that only when there are no units in the cargo hold of a building/unit then only the trigger take effect.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Hmmm I never thought about that before..... I think there isn't a condition that checks that, but you could count units with a variable that increases/decreases each time a unit is loaded/unloaded (onto a certain transport vehicle).
 
Level 6
Joined
Aug 19, 2007
Messages
109
Hmmm I never thought about that before..... I think there isn't a condition that checks that, but you could count units with a variable that increases/decreases each time a unit is loaded/unloaded (onto a certain transport vehicle).

Erm, when you say "decreases" and "unloaded"...I have tried:
-When ability "(The one where you get peons back to work)" is used do actions.-But what happens if the player just clicks on the portrait of their unit to unload them? The variable wont count the clicked ones.

Anyway you just said "There isnt a condition that checks that" but then you say "count with a variable each time it is loaded/unloaded". How can i check if a unit is loaded/unloaded if the question is "I need a condition (Or event) that counts when a unit exits a cargo hold".
:eekani:

Thanks for the advice though!
 
Level 6
Joined
Aug 19, 2007
Messages
109
ohhh thanks, except when i click the portrait of the unit to exit it still doesnt work.(The standdown one does though):cry:lol, the main reason for this question is "how do i make it when i click the portrait" the condition counts it.
Any ideas?
-If not, then any ideas of how to disable "exiting the transport by clicking on the unit's portrait"?-but only exiting by using the ability-unload/standdown/etc..

Edit: Alright heres my trigger:
1:The unit IS a hvy mg/post
2:I have given the orc burrow abilities to the MG (Battle Stations/Cargo hold/Stand down)-Cargo holds 1 person only.(I have tried it with 2)
3:the game display is just there for me to check if trigger worked.
4:It only works when i click the stand down ability, not when i click on the unit's portrait. Plz tell me why.:cry:
 

Attachments

  • HELP.JPG
    HELP.JPG
    37 KB · Views: 162
Last edited:
Level 7
Joined
Mar 12, 2006
Messages
407
  • unload workers
    • Events
      • Unit - A unit is issued order to target an object
    • Conditions
      • (Issued order) equal to (Order(unload))
    • Actions
      • Unit - Set the custom value of (Ordered unit) to ((Custom value of (Ordered unit)) - 1)
I think i didnt tell you the whole story, sorry ;)
You need 2 triggers you can just delete the unload condition from your first trigger and then make this one in addition
Dont set custom value to 0 on this event unless your transport can only load one unit
standdown quits all so 0 is right there
 
Status
Not open for further replies.
Top