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

Count Units being loaded

Status
Not open for further replies.
Level 2
Joined
Sep 28, 2007
Messages
18
Hi, i am having some problems here :(

I need with triggers, get the amount of units loaded into a specific type of building(like Orc Burrow), the problem is that i have 4 different types of this building which they load units in it.

  • Update Income
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Int_Counter) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Income[Int_Counter] = 0
          • Unit Group - Pick every unit in (Units owned by (Player(Int_Counter)) of type Worker (Blood Elf)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is being transported) Equal to True
                  • (Unit-type of (Transporting unit)) Equal to Lumber Mill
                • Then - Actions
                  • Game - Display to (All players) for 5.00 seconds the text: In!
                • Else - Actions
                  • Game - Display to (All players) for 5.00 seconds the text: Out!
As a result, all blood elf workers, were Out! The reason is here..
  • (Unit-type of (Transporting unit)) Equal to Lumber Mill
I guess...It is not working, because there is no unit event responding to Transporting Unit, but i couldnt find any other condition to specify which type of building it is in.

So.. i intented to try something different.

  • Elf enter lumber
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • (Unit-type of (Transporting unit)) Equal to Lumber Mill
    • Actions
      • Unit - Set the custom value of (Transporting unit) to ((Custom value of (Transporting unit)) + 1)
But... there is no Event where a unit is Unload from a transport :(

Thanks!
 
Level 2
Joined
Sep 28, 2007
Messages
18
event - unit issued targeting a point
condition ability being cast equal to unload
action - what u want

It doesnt works like that...

There is no action or ability if you unload from the lumber mill and there isnt any ability either :(

When a unit is loaded into a transport works fine.. but the problem is when i try to unload them.

Thanks anyways.
 
Level 2
Joined
Sep 28, 2007
Messages
18
It doesnt works like that...

There is no action or ability if you unload from the lumber mill and there isnt any ability either :(

When a unit is loaded into a transport works fine.. but the problem is when i try to unload them.

Thanks anyways.
Well.. unload is done when you order the unit to stop... but i have a problem with it... you cannot get event response to the transporting unit, since the order to stop and unload is from the unit being carried, and i need to know somehow which building is to modify its custom value :(

Well... i will need to change the whole system, but i can do something with it anyways.
 
Status
Not open for further replies.
Top