• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help about stopping an upgrade of a structure

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
Ok I have a problem last time but a lot of solution have no solution to my problem and forced me to find another way. (Which is an awkward way.) Now I need another help.
I need help about stopping an upgrade of a structure.
I use custom resources here so this may be hard.
This is my trigger so far and I need some stopping trigger.
  • Farm Ancient
    • Events
      • Unit - A unit Begins an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Farm (Ancient Age)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] Less than or equal to 49
        • Then - Actions
          • "Need stopping upgrade here"
          • Set PG = (Player group((Owner of (Triggering unit))))
          • Cinematic - Clear the screen of text messages for PG
          • Game - Display to PG for 5.00 seconds the text: ...
          • Custom script: call DestroyForce (udg_PG)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] Less than or equal to 24
            • Then - Actions
              • "Need stopping upgrade here"
              • Set PG = (Player group((Owner of (Triggering unit))))
              • Cinematic - Clear the screen of text messages for PG
              • Game - Display to PG for 5.00 seconds the text: ...
              • Custom script: call DestroyForce (udg_PG)
            • Else - Actions
              • Set Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] = (Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] - 50)
              • Set Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] = (Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] - 25)
Edit: Lol....Got a solution ~_~. Sorry for spamming
Here is my trigger.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] Less than or equal to 24
    • Then - Actions
      • Custom script: call IssueImmediateOrderById( GetTriggerUnit( ), 0xD0008 )
      • Set PG = (Player group((Owner of (Triggering unit))))
      • Cinematic - Clear the screen of text messages for PG
      • Game - Display to PG for 5.00 seconds the text: ...
      • Custom script: call DestroyForce (udg_PG)
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] Less than or equal to 49
        • Then - Actions
          • Custom script: call IssueImmediateOrderById( GetTriggerUnit( ), 0xD0008 )
          • Set PG = (Player group((Owner of (Triggering unit))))
          • Cinematic - Clear the screen of text messages for PG
          • Game - Display to PG for 5.00 seconds the text: ...
          • Custom script: call DestroyForce (udg_PG)
        • Else - Actions
          • Set Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] = (Player_Resources_Timber[(Player number of (Owner of (Triggering unit)))] - 50)
          • Set Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] = (Player_Resources_Food[(Player number of (Owner of (Triggering unit)))] - 25)
Damm I thought
  • Custom script: call IssueImmediateOrderById( GetTriggerUnit( ), 0xD0008 )
can only be use on Researches ~_~
 
Status
Not open for further replies.
Top