SC2Mapster Forums

Development > Melee Development

Making a map and need help with victory conditions

  • 9 posts
    #1 Oct 30, 2011 at 19:03 UTC - 0 likes

    Ive been making this map and i want to set the victory condition that you must kill the opposing players special unit. So when the special unit dies, your army looses the game. How do i set this condition and how do i set that special unit? sorry im kinda new at this.

    #2 Oct 30, 2011 at 19:36 UTC - 0 likes

    @softshell1984: Go

    Welcome to sc2mapster! Feel free to send me a PM if you need anything ;)

    So you will want to make a variable to store your "special unit". You should have 2 variables- one for player 1's unit, and 1 for player 2's. Each of those variable should be "unit" variables.

    Next, make a trigger. The event should be "unit dies". And then you would set the unit to your special unit for player 1. The events would be whatever you want to happen- like you could show a message saying "PLAYER 2 WINS!!". You would then make a 2nd trigger, but this one will have an event that runs when the 2nd unit dies.

    I'm not sure how experienced you are- if you don't understand this feel free to send me a PM and I'll go into a more detailed explanation.

    Feel free to Send me a PM if you have any questions/concerns!

    #3 Oct 30, 2011 at 21:02 UTC - 0 likes

    @zeldarules28: Go

    Could you give me a step by step process, or give me some more details? thanks

    #4 Oct 30, 2011 at 22:43 UTC - 0 likes

    @softshell1984: Go

    First up, create 2 global variables, with the type "unit" (i'll refer to them with "p1 special" and "p2 special", but u can name them whatever you want). Leave their initial values to "no unit.

    On the trigger your using to create the special units, add a set variable right after the "create ... for player 1" action. Make it read "set "p1 special" = Last created unit". Do the same after "create ... for player 2" only with "p2 special"

    Make a new trigger, with the event "Unit Dies". Leave it on "Any Unit". Create an "If Then Else" action, and add a comparison to the "If". Change it to "triggering unit = p1 special". Then, add "end game in victory for player 2" and "end game in defeat for player 1" to the "Then"

    Finally, just copy paste the "If Then" in the same trigger, change it to "p2 special", inverse the victory and defeat, and you should be good to go.

    Lemme know if you ahve any problems, or need me to elaborate something:)

    Last edited Oct 30, 2011 by cbasz16
    #5 Nov 01, 2011 at 18:56 UTC - 0 likes

    sorry, i really dont even know how to do that, maybe step by step? I trying to do it but cant. thanks

    #6 Nov 01, 2011 at 20:45 UTC - 0 likes

    @softshell1984: Go


    Blizzard answered this themselves in their triggers section

    YOu should really read all their tutorials.

    I keep an updated version of my map Published at all times, This allows Users to Test new problems as they arise(For now its just on the one map though LAWL), So check it out, right now its Chop Chop Forest, I will Publish the newest update every day I work on the map. SO its ALWAYS IN THE BETA STAGES!!!!.

    #7 Nov 02, 2011 at 01:58 UTC - 0 likes

    @rageofhell: Go

    thanks man, really helped me out

    #8 Nov 02, 2011 at 18:07 UTC - 0 likes

    @softshell1984: Go

    Yeah Im really new to all this, Blizzard has 5 sections of tutorials, Read those they can really help you out.

    #9 Nov 02, 2011 at 19:11 UTC - 0 likes
    Quote from rageofhell: Go

    @softshell1984: Go

    Yeah Im really new to all this, Blizzard has 5 sections of tutorials, Read those they can really help you out.

    Yeah, making map is soooo easy, effortless, every map should be free!!!

  • 9 posts

You must login to post a comment. Don't have an account? Register to get one!