Order UI to cancel/escape

Lord Regno

Active Member
Reaction score
19
Why are the cancel/escape don't working here? Are it only AI units that you can order to do this?

Trigger:
  • Constract
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at (Position of (Constructing structure))) Equal to Icecrown Glacier - Dark Ice
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Constructing structure)) Equal to Ice wall
              • (Unit-type of (Constructing structure)) Equal to Jelly Wall
        • Then - Actions
        • Else - Actions
          • Game - Display to (All players) the text: Test
          • Selection - Clear selection for (Owner of (Constructing structure))
          • Selection - Select (Constructing structure) for (Owner of (Constructing structure))
          • Game - Force (Owner of (Constructing structure)) to press Escape/Cancel
          • Selection - Select Dwarf_Builder[(Player number of (Owner of (Constructing structure)))] for (Owner of (Constructing structure))
 

Setharoth114

New Member
Reaction score
5
Hm, offhand not sure.
The Test appears, right?

I think theres something under the unit menu that allows you to cancel construction. You can also try kill (constructing structure)

Also, you should keep in mind that the way you have it set up now, it would be impossible to build anything except an Ice Wall or a Jelly Wall. If it was anything else, it wouldn't fit into the conditions and would automatically trigger the else. Dunno if thats what you were aiming for or not.
 

Jedi

New Member
Reaction score
63
Trigger:
  • Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
 

Lord Regno

Active Member
Reaction score
19
Setharoth114, yes the test appears and I just want to be allowable to build walls at that spot and only at that spot. And I will not give order to kill the wall because I want the player to get back there gold and wood.


It did now worked, I tested it both at marking the unit and unmark, and I even changed the code to:
Trigger:
  • Custom script: call IssueImmediateOrderById(GetConstructingStructure(), 851976)

Trigger:
  • Constract
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at (Position of (Constructing structure))) Equal to Icecrown Glacier - Dark Ice
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Constructing structure)) Equal to Ice wall
              • (Unit-type of (Constructing structure)) Equal to Jelly Wall
        • Then - Actions
        • Else - Actions
          • Game - Display to (All players) the text: Test
          • Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
maybe try adding a wait of 0.00 seconds, i might be wrong but some actions cannot be performed because the unit you want to give an order to cannot carry it out at that moment.
 

Lord Regno

Active Member
Reaction score
19
I added a w8 trigger in the first trigger because I thought that to. Added it again now under the jass code but still nothing happened.
 
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