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,
 
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.
 
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
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top