How do i make regular units to be purchased like mercenaries.

sunshinex3

You can change this now in User CP.
Reaction score
7
mercenaries can be purchased 3 at a time or so on with a cool down that starts rolling in the back ground i want to do that for some player units(zerg race) but i don't how and i can't find any thing on the subject...

Stats - Stock Maximum
Stats - Stock Replenish Inter...
Stats - Stock Start Delay

I have filled these 3 fields in? What else do I need?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
You need to go to the building that trains the units. There are separate fields for units that are being trained and units that are being sold (as mercenaries).
 

sunshinex3

You can change this now in User CP.
Reaction score
7
yes that works, but now their requirements aren't in effect... why can't it ever be easy. thank you for your help.
 

sunshinex3

You can change this now in User CP.
Reaction score
7
well that sux, found nothing of value, looking into a replace / disable trigger
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Well the WC3 engine is an enigma. Rules usually do not follow logic or reason there.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
There is in fact a way, I just tested it out.

Give your barracks the ability "Sell Unit" [Asud]. Remove all units from the list of units sold by your barracks. It should not sell nor train any units.
Instead, use the trigger action:
Trigger:
  • Neutral Building - Add UNIT to BARRACKS with NUMBER in stock and a max stock of NUMBER

to add the units to your barracks. All units added this way can be removed with:
Trigger:
  • Neutral Building - Remove UNIT from BARRACKS
 

sunshinex3

You can change this now in User CP.
Reaction score
7
//having a problem with the remove trigger going to post.

Zerg units remove sold


Trigger:
  • Zerg units remove sold
    • Events
    • Unit - A unit Dies
    • Conditions
    • And - All (Conditions) are true
    • Conditions
    • ((Unit-type of (Dying unit)) Equal to Spawning Pool (zerg)) or (((Unit-type of (Dying unit)) Equal to Den (Zerg)) or (((Unit-type of (Dying unit)) Equal to Nest (Zerg)) or ((Unit-type of (Dying unit)) Equal to Lair (Zerg))))
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Unit-type of (Dying unit)) Equal to Spawning Pool (zerg)
    • (Number of units in (Units owned by (Owner of (Dying unit)) of type Spawning Pool (zerg))) Less than 1
    • Then - Actions
    • Player - Make Zerg Egg (zergling) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (zergling colony) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (zergling Hive) Available for training/construction by (Owner of (Dying unit))
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Unit-type of (Dying unit)) Equal to Den (Zerg)
    • (Number of units in (Units owned by (Owner of (Dying unit)) of type Den (Zerg))) Less than 1
    • Then - Actions
    • Player - Make Zerg Egg (Hydralisk) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (zergling colony) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (zergling Hive) Available for training/construction by (Owner of (Dying unit))
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Unit-type of (Dying unit)) Equal to Nest (Zerg)
    • (Number of units in (Units owned by (Owner of (Dying unit)) of type Nest (Zerg))) Less than 1
    • Then - Actions
    • Player - Make Zerg Egg (scanthid) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (scanthid colony) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (scanthid hive) Available for training/construction by (Owner of (Dying unit))
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Unit-type of (Dying unit)) Equal to Lair (Zerg)
    • (Number of units in (Units owned by (Owner of (Dying unit)) of type Lair (Zerg))) Less than 1
    • Then - Actions
    • Player - Make Zerg Egg (Ultralisk) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (Ultralisk colony) Available for training/construction by (Owner of (Dying unit))
    • Player - Make Zerg Egg (Ultralisk Hive) Available for training/construction by (Owner of (Dying unit))
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
    • Loop - Actions
    • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
    • Else - Actions
    • Do nothing


//ok, so when i lose a building like a spawning pool, i need units(zergling) for sale in hatcheries hives and colonies to be removed from those buildings.
 
Last edited:

jonas

You can change this now in User CP.
Reaction score
66
Just reply to Accname's posts using the "Reply" button, you'll see how it's done
 

sunshinex3

You can change this now in User CP.
Reaction score
7
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
      • Conditions
      • ((Unit-type of (Dying unit)) Equal to Spawning Pool (zerg)) or (((Unit-type of (Dying unit)) Equal to Den (Zerg)) or (((Unit-type of (Dying unit)) Equal to Nest (Zerg)) or ((Unit-type of (Dying unit)) Equal to Lair (Zerg))))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Spawning Pool (zerg)
      • (Number of units in (Units owned by (Owner of (Dying unit)) of type Spawning Pool (zerg))) Less than 1
      • Then - Actions
      • Player - Make Zerg Egg (zergling) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (zergling colony) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (zergling Hive) Available for training/construction by (Owner of (Dying unit))
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (zergling) from (Picked unit)
      • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Den (Zerg)
      • (Number of units in (Units owned by (Owner of (Dying unit)) of type Den (Zerg))) Less than 1
      • Then - Actions
      • Player - Make Zerg Egg (Hydralisk) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (zergling colony) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (zergling Hive) Available for training/construction by (Owner of (Dying unit))
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Hydralisk) from (Picked unit)
      • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Nest (Zerg)
      • (Number of units in (Units owned by (Owner of (Dying unit)) of type Nest (Zerg))) Less than 1
      • Then - Actions
      • Player - Make Zerg Egg (scanthid) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (scanthid colony) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (scanthid hive) Available for training/construction by (Owner of (Dying unit))
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (scanthid) from (Picked unit)
      • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Lair (Zerg)
      • (Number of units in (Units owned by (Owner of (Dying unit)) of type Lair (Zerg))) Less than 1
      • Then - Actions
      • Player - Make Zerg Egg (Ultralisk) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (Ultralisk colony) Available for training/construction by (Owner of (Dying unit))
      • Player - Make Zerg Egg (Ultralisk Hive) Available for training/construction by (Owner of (Dying unit))
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hatchery (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Colony (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
      • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) of type Hive (zerg)) and do (Actions)
      • Loop - Actions
      • Neutral Building - Remove Zerg Egg (Ultralisk) from (Picked unit)
      • Else - Actions
      • Do nothing
 
Last edited:

jonas

You can change this now in User CP.
Reaction score
66
No idea, but it's still impossible to read (we don't even know where the else clauses are ending). Maybe you could try [ code ]... [/ code ] as a workaround.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
There is couple of things to note:
1) To get proper indention on your trigger you need to actually put some whitespaces in your code. If you copy the code from the editor the whitespaces should be correct already.
2) Your trigger is leaking memory quite heavily. There are numerous memory leaks which will create lag in your map after this trigger has run too many times. (each run of the trigger takes away some of your memory permanently). Do a google search on memory leaks and how to avoid them.
3) You should not be using "Dying unit". Replace "Dying unit" with "Triggering Unit" everywhere.
4) I would recommend getting the system to work in a small test map first with a single unit type. Then, expand on that and keep testing to make sure things still work out.
 

sunshinex3

You can change this now in User CP.
Reaction score
7
i found the problem, i need a condition that counts units of a certain type, not all units
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top