winning conditions

branno

New Member
Reaction score
2
im making a map thats 5v5 and i need to make it so that you will only win once you have defeated every players base on the opposite team can someone please give me a trigger for this.

ty :)
 

Zealot

Member
Reaction score
11
Default Warcraft 3 map trigger? The Map initialization trigger? Isnt that what your trigger is supposed to do?
 

branno

New Member
Reaction score
2
not realy cuz it reveals their position cuz there is no town hall and id rather just make my own anyway, i currently have a trigger but it makes u win for only killing 1 of the enemies bases which kinda sucks lol and i cant find a way around it. :banghead:
 

Sir Gordon

Decent User (I'm as good as you)
Reaction score
43
Let's see...
First set an integer variable called e.g Bases.
Code:
Events:
Map Initialization
Actions:
Player Group - Pick every player in (all players) matching (Picked Player) an do (Actions)
IF/THEN/ELSE:
If - Conditions:
(Picked Player) slot status) equal to (Is playing)
Then - Actions:
Set Bases = Player number (Picked Player)
Else - Actions:

Then do the second trigger:
Code:
Events:
Unit dies
Conditions:
type of (Dying Unit) is equal to (Your Base Building)
Actions:
Set Bases = Bases - 1
IF/THEN/ELSE:
If - Conditions:
Bases is equal to 0
Then - Actions:
Victory (Owner of (Killing Unit)) Show Dialogs, Show scores
Else - Actions:
Handwritten ;/
 

branno

New Member
Reaction score
2
i had a lil problem making the triggers but this is what i got so far.


Code:
Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) slot status) Equal to Is playing
                    Then - Actions
                        Set Bases[10] = (Player number of (Picked player))
                    Else - Actions



Code:
Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Altar of Kings
    Actions
        Set Bases[1] = Bases[1]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
                Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
            Else - Actions

as you can see i didnt get the bit "Bases is equal to 0" or "Set Bases = Bases - 1" and some parts are a little bit different to yours but im guessing thats cuz you wrote it straight from your head.

need help to fix it up plz.
 

Sir Gordon

Decent User (I'm as good as you)
Reaction score
43
did you make the integer as an integer type of variable?

Also, I think in the end you don't need arrays.
 

branno

New Member
Reaction score
2
ok i took the arrays away and yes it is an integer variable but still i cant see how to make the "Bases is equal to 0" condition, which condition type is it from the list?
 

branno

New Member
Reaction score
2
k unfortunatley this doesnt work im guessing its because its set to when there are 0 bases left u win but that would involve killing ur own base :p plus your team mates if they are still alive so i need to somehow make it so that when all bases on the opposite team have been destroid you win.
 

branno

New Member
Reaction score
2
anyone got some other ideas? :mad: i thought this would be a realy easy thing to do but its realy starting to anoy me.
 

DarkSonicele

New Member
Reaction score
20
First of all, don't quadrupole post.

Perhaps you should try to make a trigger checking every X seconds, whet ever your opponent still have units or not, if not, pick every player on your team and then set them as the game victors?
 

Vylatin

New Member
Reaction score
32
Events
A unit dies

Conditions
Unit type of dying unit equal to "your unit 1"

Actions
If -
(All conditions are true)
"your unit 2" is dead equal to true
"your unit 3" is dead equal to true
Then -
Victory!
Else -
 

branno

New Member
Reaction score
2
thanks Vylatin that worked, i knew there was a simple way of doing this... anyway thanks everyone for ur help. :D
 
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