Invulnerable buildings wont let the game end after defeat.

NoNaval

New Member
Reaction score
0
Hello everyone! It's nice that there is a helpful map editor community. I have a simple problem so I'm sorry for not giving you a worthy challenge for your savvy minds.

I created a map based around fast action naval combat. Every player has 3 invulnerable shipyards that they buy their ships from. How do i make it so these buildings are not needed to be destroyed for the player to actually be defeated.

Thank you in advance.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Something like this maybe ? :eek:

Trigger:
  • Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempGroup = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Not equal to (Your_Invulnerable_Building)))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • Set TempPGroup = (All enemies of (Owner of (Triggering unit)))
          • Player Group - Pick every player in TempPGroup and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
          • Custom script: call DestroyForce(udg_TempPGroup)
          • Set TempPGroup = (All allies of (Picked player))
          • Player Group - Pick every player in TempPGroup and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Defeat!
          • Custom script: call DestroyForce(udg_TempPGroup)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)


Not tested, but should work ;)
 

SyrisX

New Member
Reaction score
3
Not sure that is quite what he is looking for...

I may be reading your trigger wrong but from the looks of it, the following statement is true:

If a single player loses all buildings (other than his invulnerable shipyard) then all of his enemies win.. even if there are multiple enemies, who are also enemies with each other, left alive.

So this would only work for 1v1.. or if you are looking for a two team battle where the first team to kill off one player wins.

Or maybe I am entirely wrong :p lol


Edit: Maybe only use the defeat portion and have a separate trigger that calls for victory when there is only one player left alive?
 

NoNaval

New Member
Reaction score
0
Not sure that is quite what he is looking for...

I may be reading your trigger wrong but from the looks of it, the following statement is true:

If a single player loses all buildings (other than his invulnerable shipyard) then all of his enemies win.. even if there are multiple enemies, who are also enemies with each other, left alive.

So this would only work for 1v1.. or if you are looking for a two team battle where the first team to kill off one player wins.

Or maybe I am entirely wrong :p lol


Edit: Maybe only use the defeat portion and have a separate trigger that calls for victory when there is only one player left alive?

You made a very good point so let me expand on my description.

The map I made has two teams and each team has 4 players(4v4). The game is pretty much identical to regular melee rules of the standard Warcraft 3 Frozen throne games. (You start out with a town hall and build a base etc).

It's just like in a regular melee game when you lose your base you are defeated individually. So my problem is that i needed to make the 3 shipyards that everyone gets invulnerable. Since they can't be destroyed the person controlling them is never defeated.

I didn't think i would need a trigger for this. It's going to be a headache if i have to make a trigger. That thing he wrote up would be just as good if it was in Chinese.
 

Avaleirra

Is back. Probably.
Reaction score
128
Did you delete the melée triggers that were there when your map was first made?


EDIT: and also, your going to have to write out a trigger that states your victory/defeat options. E.g, town hall is destroyed, that player loses
 

NoNaval

New Member
Reaction score
0
Did you delete the melée triggers that were there when your map was first made?


EDIT: and also, your going to have to write out a trigger that states your victory/defeat options. E.g, town hall is destroyed, that player loses

No, i didn't delete the melee triggers that were there because i need all of them. But it looks like I'm going to have to delete the melee defeat trigger because I have tried to get around it through other means but have been unsuccessful.

I hope its not too much to ask but I think I'm going to need a good amount of guidance with making a trigger.

Can i make the trigger be something along the lines of "If your Town hall, barracks, and altar are all destroyed then you are defeated"?
 

Moridin

Snow Leopard
Reaction score
144
Yeah you can....this is freehand, so it will be something like:

Trigger:
  • Defeat condition
    • Events
      • A unit dies
    • Conditions
      • Or - (Any Conditions) are True
        • (Unit type of (Triggering unit)) Equal to Town hall
        • (Unit type of (Triggering unit)) Equal to Barracks
        • (Unit type of (Triggering unit)) Equal to Altar
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering Player) matching (((Unit-type of (Matching unit)) Equal to Town Hall) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Alive_Town_Halls ->>Unit group variable
      • Unit Group - Pick every unit in (Units owned by (Triggering Player) matching (((Unit-type of (Matching unit)) Equal to Barracks) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Alive_Barracks ->>Unit group variable
    • Unit Group - Pick every unit in (Units owned by (Triggering Player) matching (((Unit-type of (Matching unit)) Equal to Altar) and (((Matching unit) is alive) Equal to True))) and do (Actions)
      • Loop - Actions
        • Unit Group - Add (Picked unit) to Alive_Altars ->>Unit group variable
    • If (All conditions are true) then (Then actions) else do (Else actions)
      • If - Conditions
        • (Alive_Town_Halls is empty) Equal to True
        • (Alive_Barracks is empty) Equal to True
        • (Alive_Altar is empty) Equal to True
      • Then - Actions
        • Game - Defeat (Triggering Player) with the message: Defeat!
      • Else - Actions
        • <any actions you want>


This should work...
 

NoNaval

New Member
Reaction score
0
I'm so lost...

i get to the first "loop actions" under actions and then I'm stumped...

i hate triggers :banghead:
 

HydraRancher

Truth begins in lies
Reaction score
197
Why do your players have to own the shipyards? cant you simply make them neutral passive?
 

NoNaval

New Member
Reaction score
0
Why do your players have to own the shipyards? cant you simply make them neutral passive?

Because the enemy team can come to your base and buy the ships from your shipyard.

I couldn't get the shipyards to only sell ships to individual players or team specific.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top