• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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