Stop unit from upgrading

Dito

New Member
Reaction score
0
Hello!

How can I stop triggering unit (a town hall) from upgrading into a keep with triggers after I started the upgrading?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
if order is issued (event: unit is issued an order without target) order the unit to cancel.
therefor you need custom script because the cancel order is only available via an ID code.
 

Dito

New Member
Reaction score
0
I'm using this trigger to get the cancel ID:

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))


But I don't get any message upon cancelling the upgrade? :/


Edit: Found the custom script, it is:
Code:
Custom script:   call IssueImmediateOrderById( GetTriggerUnit(), 0x000d0008 )

Edit 2: Since I already got a thread up, I might aswell just ask this:

Will this play the sound for owner of triggering unit only?

Trigger:
  • Sound - Play Error <gen>
    • Custom script: if GetLocalPlayer() != GetOwningPlayer(GetTriggerUnit()) then
    • Sound - Stop (Last played sound) Immediately
    • Custom script: endif
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
as far as i know you can move the "play sound ..." action inside the GetLocalPlayer comparison without any desyncs. but i am not entirely sure.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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