Units belonging to a certain player enter a region...

Enjsalo

New Member
Reaction score
0
I am trying to finnish one simple map, but this editor is just toi complicated! Perhaps you can help so that i'll learn how it works!

Problem 1:
I want players on this map to have special victory conditions. Protoss player (player 2) objectives is to find and control 4 conquest areas. When protoss has units at all for conquest zones, a countdown timer will appear fir all players, counting down from 60s. If protoss lose control over one zone the timer should pause, and unpause when he takes all four zones back (by having a unit at that location, not allowing any other player to have units there).
A leaderboard should show how many zones protoss has in his control.

Problem 2: ill post that when problem 1 is solved.
 

Phubar

Ultra Cool Member
Reaction score
30
Sry for my incomplete answer but im at work and i use my smertphone.
You have to make a trigger for each region with:
EVENTS
Any unit enters region1
Any unit leaves region1
ACTIONS
IF
Number of units owned by player2 in region1 >0
Number of units owned by player1 in region1 =0
Then
set "owning region1"=1
Else
set "owning region1"=0

IF
"owning region1"=1
"owning region2"= 1
"owning region3"= 1
"owning region4"= 1
Then resume timer
Else pause timer
 

Phubar

Ultra Cool Member
Reaction score
30
To show how many regions are controlled just make the sum of the 4 variables "owning region"
 

Phubar

Ultra Cool Member
Reaction score
30
If you want to resume timer after that protoss defeats all enemy units in the region just add "any unit dies" as third event.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Here's what I would do:

You need two variables. One Timer variable called Conquest timer and one Timer Window variable called Conquest timer window.

Trigger:
  • Conquest
    • Events
      • Unit - Any Unit Enters Region1
      • Unit - Any Unit Enters Region2
      • Unit - Any Unit Enters Region3
      • Unit - Any Unit Enters Region4
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) == 2
      • (Number of Living units in (Any units in Region1 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) > 0
      • (Number of Living units in (Any units in Region2 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) > 0
      • (Number of Living units in (Any units in Region3 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) > 0
      • (Number of Living units in (Any units in Region4 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) > 0
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Conquest timer window is visible for player (Triggering player)) == False
        • Then
          • Timer - Start Conquest timer as a One Shot timer that will expire in 60.0 Game Time seconds
          • Timer - Create a timer window for (Last started timer), with the title "Conquest", using Remaining time (initially Visible)
        • Else
          • Timer - Unpause Conquest timer

Trigger:
  • Lose control
    • Events
      • Unit - Any Unit Leaves Region1
      • Unit - Any Unit Leaves Region2
      • Unit - Any Unit Leaves Region3
      • Unit - Any Unit Leaves Region4
    • Local Variables
    • Conditions
      • (Conquest timer is paused) == False
      • (Owner of (Triggering unit)) == 2
      • Or
        • Conditions
          • (Number of Living units in (Any units in Region1 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
          • (Number of Living units in (Any units in Region2 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
          • (Number of Living units in (Any units in Region3 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
          • (Number of Living units in (Any units in Region4 owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
    • Actions
      • Timer - Pause Conquest timer
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top