Go to and load

Status
Not open for further replies.
Level 11
Joined
May 26, 2009
Messages
760
Greetings Dear Hivers,

I have tried various things to beat this problem, but with no success yet. I want to make a simple GUI trigger function. The problem is; how should I make the building load the unit AFTER it arrives by the building? The below is how it would be in a perfect world.

  • Unit Walks
  • Events
    • Unit - A unit Finishes construction
  • Conditions
    • (Unit-type of (Constructed structure)) Equal to House
  • Actions
    • Unit - Order Villager 0001 <gen> to Move To (Position of (Constructed structure))
    • Wait - Wait until Villager 0001 <gen> comes within 100.00 radius of (Position of (Constructed structure)
    • Unit - Order (Constructed structure)) to Load Villager 0001 <gen>
Yours Truly,
Chizume
 
Last edited:
Level 12
Joined
May 30, 2009
Messages
829
Er... maybe you could loop the "stop" order which is turned off when the unit comes within a certain distance of the loading unit (there's an event for that).

Yours Falsely,

Aesthetics

P.S. I would like to warn you that your title may be breaking the rules because it it not in English. (yeah it's that serious :p)

P.S.S. I would also like to warn you that your signature contains some... non-English language.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Maybe like this:

  • Untitled Trigger 065
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Trigger - Add to Untitled Trigger 066 <gen> the event (Unit - A unit comes within 256.00 of (Triggering unit))
  • Untitled Trigger 066
    • Events
    • Conditions
      • ((Triggering unit) is alive) Equal to True
    • Actions
      • Set Temp_Group_1 = (Units within 256.00 of Temp_Loc_1 matching ((Unit-type of (Matching unit)) Not equal to Town Hall))
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Board (Triggering unit)
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
Or add the constructed unit to a global unit group, then loop through the group every one second, pick every unit you want to load into the unit within range and issue the order.
 
Level 11
Joined
May 26, 2009
Messages
760
Er... maybe you could loop the "stop" order which is turned off when the unit comes within a certain distance of the loading unit (there's an event for that).

Yours Falsely,

Aesthetics

P.S. I would like to warn you that your title may be breaking the rules because it it not in English. (yeah it's that serious :p)

P.S.S. I would also like to warn you that your signature contains some... non-English language.

First of all I'd like to smite you for your rude approach. Second I thank you for your warning, and I protect myself by saying I've seen worse.

Yours Truly,
Chizume

Maybe like this:

  • Untitled Trigger 065
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Trigger - Add to Untitled Trigger 066 <gen> the event (Unit - A unit comes within 256.00 of (Triggering unit))
  • Untitled Trigger 066
    • Events
    • Conditions
      • ((Triggering unit) is alive) Equal to True
    • Actions
      • Set Temp_Group_1 = (Units within 256.00 of Temp_Loc_1 matching ((Unit-type of (Matching unit)) Not equal to Town Hall))
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Board (Triggering unit)
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
Or add the constructed unit to a global unit group, then loop through the group every one second, pick every unit you want to load into the unit within range and issue the order.

Thank you for your help. I tried it but couldn't get the actual boarding part to work properly. Not with some minor edits to the triggers either. Could it be done in a different way? Using dummies won't matter in this case.

Thanks again!

Yours Truly,
Chizume
 
Status
Not open for further replies.
Top