lummerlars
Member
- Reaction score
- 2
Hello guys.
I've a question and I can't fiqure this trigger out myself so I would love to have some help.
Okay - The map is basically about capturing buildings to gain more points.
There are 5 building (Called Citadels) in the map - right now they are called:
Citadel A
Citadel B
Citadel C
Citadel D
Citadel Mid
(That's just for now)
There are 2 teams
Player 1-5 (Team 1)
Player 5-10 (Team 2)
And the citadels are owned by Player 12 (brown)
So the idea is that every Citadel in the game are owned by Player 12 in the beginning, and if a team (1 or 2) kills a citadel they'll get the Citadel.
So - Team 1 kills a citadel then set the owner of Citadel to Team 1 or something like that.
And you'll get like 10 point every 10 second for each citadel you own (But I think i can handle that trigger though)
I've created this trigger so far, and what it does:
It checks for each Citadel which are killed and then respawn the killed Citadel.
But the problem is that it just respawns the Citadel in the Attackin Units ownership.
I want it to check if the AttackingUnit equal to Team 1 or Team 2, and then spawns a Citadel equal to the owner of the AttackingUnit. Because then I'm able to check how many citadels team 1 and 2 have captured duing the game.
I hope you all understand this, else I'll try to explain in more detail or what ever
I've a question and I can't fiqure this trigger out myself so I would love to have some help.
Okay - The map is basically about capturing buildings to gain more points.
There are 5 building (Called Citadels) in the map - right now they are called:
Citadel A
Citadel B
Citadel C
Citadel D
Citadel Mid
(That's just for now)
There are 2 teams
Player 1-5 (Team 1)
Player 5-10 (Team 2)
And the citadels are owned by Player 12 (brown)
So the idea is that every Citadel in the game are owned by Player 12 in the beginning, and if a team (1 or 2) kills a citadel they'll get the Citadel.
So - Team 1 kills a citadel then set the owner of Citadel to Team 1 or something like that.
And you'll get like 10 point every 10 second for each citadel you own (But I think i can handle that trigger though)
I've created this trigger so far, and what it does:
It checks for each Citadel which are killed and then respawn the killed Citadel.
But the problem is that it just respawns the Citadel in the Attackin Units ownership.
I want it to check if the AttackingUnit equal to Team 1 or Team 2, and then spawns a Citadel equal to the owner of the AttackingUnit. Because then I'm able to check how many citadels team 1 and 2 have captured duing the game.
Code:
Destroy Citadel Hostile
Events
Unit - A unit Dies
Conditions
Actions
Set Citadel = (Dying unit)
Set AttackingUnit = (Killing unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of Citadel) Equal to Citadel A
(Unit-type of Citadel) Equal to Citadel B
(Unit-type of Citadel) Equal to Citadel C
(Unit-type of Citadel) Equal to Citadel D
(Unit-type of Citadel) Equal to Citadel MID
(Owner of Citadel) Equal to Player 12 (Brown)
Then - Actions
Unit - Remove Citadel from the game
Unit - Create 1 (Unit-type of Citadel) for (Owner of AttackingUnit) at (Position of Citadel) facing Default building facing degrees
Else - Actions
Game - Display to (All players) the text: FAIL
I hope you all understand this, else I'll try to explain in more detail or what ever