• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Board an unit into a structure

Status
Not open for further replies.
Level 6
Joined
Jun 19, 2010
Messages
143
Hi,
I use Boarding function in WE trigger to train a peon, a Townhall set rally to a structure for automatically turning every peon created to the training to an infantry for instance,
when a peon has boarded into a structure (using Load ability to board an ship), its life percentage is taken by devour cargo (set its capacity of 1),
When a peon is still in that structure, another peon coming in line of the training production, new peon get lost in its order of boarding.
Thus, my question is to get the production line of peon smooth, every peon waiting for another one in a structure doesn't lose its order. They can queue up for theirs turn of training respectively one by one. In the Image below, you can track my trigger to help me.
How could I make it to prevent many idle peons?

Figure 1. Generating/Production of Wolf Peons
wolfpeon.png


Figure 2. Production of Wolf Units( Brawler/Hurler/Mauler)
hiveworkshop.png



I am working on the project of making a Warcraft 1.23 map like the game BATTLE REALMS (Liquid Entertainment), This triggering system of training units is based on the game Battle Realms, so you can easily understand my points if you have played it.
Thanks and regards,
 
Level 18
Joined
Mar 7, 2005
Messages
824
Easy prevention: Less Peons and longer walk ways :p

The other way you need to repeat the control, like every x seconds of game, re-order them to enter the next Barrack for training. You could also increase the load capacity to train more Units at the same time.

It might also be useful to store the units into a variable with a big array (that repeats itself after a specific amount, like when it reaches it's highest value it starts again from 0 or 1) with that method you can easily check how many units still waiting and also pick them to re-order them boarding the unit.

You could also use some range checker Trigger, that runs when the unit dying and a new one will be produced. Like Peon dies while loaded in the Combat Pit, then you'll create the new unit and after that check Peons within range of 100 or 200 and pick one of them and board them to your Combat Pit. So the Peons have to stay near to the Combat Pit to get trained to higher ones. (Could also be useful for custom trainings, like the player just needs to place the Peons near the Building, instead of loading each unit seperately.

Something like that :)
 
Status
Not open for further replies.
Top