Non-controllable workers to work!

WarToast

Active Member
Reaction score
3
Non-controlable minions to carry out another units order!

Alright here's the deal

I want a main base to have the option to build, but since it's a building it will be rooted.

So when I choose a building and place it, I want the the 'ressources' (maybe 'build tiny building') to be dropped at the main base or at a storage, and then have some minions come pick it up and place it where I originally ordered the building to be placed.

Now, these minions won't be controlable. I thought of giving them locust, but that means they won't get attacked, so I'll do it the way it's done in the Castle Fight maps.


So basically what I need:
  • Choose a building from the build menu of the main base.
  • Place the building like you normally would - but the base won't carry out the order
  • Main base will drop an item ('tiny' building), which
  • A random, CURRENTLY NOT WORKING MINION, will move to pick up and place at the original spot I picked with my main base.
  • When the minion picks up the building and receives the order, the main base is not dependent on its old build order anymore and can proceed to the next building, dropping new items, calling a new minion etc.
  • When minion is done working, it should return to patrol or whatever. (Not important so far)


And that's it. I'm not a big Jasser, in fact I can only do a few custom lines in my GUI'ing. I need to know if this is possible, and if so, I'd like some ideas :)


Thanks,
 

A.Dominion

New Member
Reaction score
0
hum look like i can't post the map

ok i made a mini map doing what you want i spent 10 minutes so it is pretty un-neat, but maybe it will inspire you or help you do better.
since i can't post the map here are the trigger (they should be polished!! these are fast made trigger, very bad triggering)

Trigger:
  • detect order id
    • Evénements
      • Unité - A unit Reçoit un ordre avec point pour cible
    • Conditions
    • Actions
      • Partie - Display to (All players) the text: (String((Issued order)))

this trigger is to detect the order id, when you ask to build things

Trigger:
  • build
    • Evénements
      • Unité - A unit Reçoit un ordre avec point pour cible
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Issued order) Egal Ã_ (Order(farm))
        • Alors - Actions
          • Partie - Display to (All players) the text: order detected
          • Set BuildPoint = (Target point of issued order)
          • Set Temp_point = (Point((X of (Position of (Triggering unit))), ((Y of (Position of (Triggering unit))) - 128.00)))
          • Objet - Create Petite Ferme at Temp_point
          • Set Builditem = (Last created item)
          • Déclencheur - Run pick worker <gen> (checking conditions)
        • Sinon - Actions


this create an item at 128 south of the main base (main base is a non-building unit with 0 speed and no movement type)(real building can't build)

Trigger:
  • pick worker
    • Evénements
    • Conditions
    • Actions
      • Groupe unité - Pick every unit in (Random 1 units from (Units owned by Joueur 2 (Bleu) matching (((Unit-type of (Matching unit)) is Une unité de type Péon) Egal Ã_ TRUE))) and do (Actions)
        • Boucle - Actions
          • Unité - Order (Picked unit) to Clic droit Builditem
          • Set Builder = (Picked unit)
          • Partie - Display to (All players) the text: (worker has recieved orders to pick item ( + ((Name of (Picked unit)) + )))


this trigger select a random worker and ask him to pick up the item (worker are blue player so you can't control them) (i heard if you use the balise classification it remove the control so you can make your own unit unable to control) i couldn't find the idle worker check (the blue unit are worker) so you will have to make unit group to check if worker is avaiable for order or not.

Trigger:
  • item picked
    • Evénements
      • Unité - A unit Acquiert un objet
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Hero manipulating item) Egal Ã_ Builder
        • Alors - Actions
          • Héros - Order Builder to use Builditem on BuildPoint
          • Partie - Display to (All players) the text: (worker has recieved orders to drop item ( + ((Name of (Picked unit)) + )))
        • Sinon - Actions

this will give the order to the unit to build the farm at the position asked by the main base.


i hope you can figure it out for the rest, if needed more ask me... this is not MUI but it can easily be MUI so if you can't do it by yourself ask around or maybe if i have time i will polish the trigger if needed.
 

WarToast

Active Member
Reaction score
3
Alright thanks man, I'll see what I can do with it and report back.

However I'm confused by the weird signs :rolleyes:

EDIT: By the way, would it have to be written entirely in JASS to make it MUI? Because of local variables.

The issued order string doesn't work, as seen on the screenshot. Any ideas?

issuedorder.jpg

Well I reached the point where the peasant (in my case) goes to pick up the item created. I got that working, and now I'm trying to detect when a worker is idle. I tried using

Trigger:
  • Pick Worker
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Random 1 units from (Units of type Peasant)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(stop))
            • Then - Actions
              • Unit - Order (Picked unit) to Right-Click TinyBuilding[1]
              • Set Worker[1] = (Picked unit)
              • Game - Display to (All players) the text: Idle unit is picked...
            • Else - Actions
              • Game - Display to (All players) the text: No idle worker
              • Do nothing


(Current order of (Picked unit)) Equal to (Order(stop))
and
(Current order of (Picked unit)) Equal to (Order(idle))

Idle seems to have no effect at all, and if it's on stop it doesn't go any further, as if the current order of the peasants aren't stop (they are idle, so it should be on stop)

UPDATE: The correct order string is (Order(none))

And it's working fine now. Now I just need to buff it (clean for leaks and optimize it) and eventually try and make it MUI
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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