SC2Mapster Forums

Development > Triggers

Arcade Game Lobby to Ingame triggers

  • 6 posts
    #1 Feb 28, 2013 at 20:03 UTC - 0 likes

    Hi, I've got a custom melee map with modified units and I wanna add two game modes.

    I wanna play one with capital ships (or "all techs"), and one without them (or "no capital ships"). I'do this by making a custom upgrade that disables all capital ships with requirements and a trigger that automatically researches this for all players. But the trigger must check the game mode to do that.

    I tried this tutorial: http://www.sc2mapster.com/forums/resources/tutorials/5486-lobby-game-modes-the-complete-guide-reference/

    With no luck, it does nothing, I even made "if then else" with one beeing the all techs and a comment and the other the no capital ships and a comment but it just keeps showing the if one no matter the game mode.

    I could attach a map to show my problem if you ask me to but i believe someone knowng the triggers well might be able to outright tell me where I screwed it up.

    Thanks

    #2 Feb 28, 2013 at 20:07 UTC - 1 like

    @urzaiz87: Go Hi, welcome to mapster. You can't detect the game mode directly but you can detect some aspects like mage speed and others. If everything is the same for both modes you may want to create a game attribute so each mode can use it. Then detect the attribute value.

    #3 Feb 28, 2013 at 20:54 UTC - 0 likes

    Indeed, that's what the tutorial does, but when i create the attribute and give.. say 1 to all techs and 2 to no cap ships the trigger it's supposed to check that and nothing happens it's like first option is always true and i don't know why. I'm gonna attach the file here so you can see what's going on.

    #4 Feb 28, 2013 at 21:07 UTC - 0 likes

    @SoulFilcher: Go

    Here's the file.

    Last edited Feb 28, 2013 by urzaiz87
    Name Size MD5
    Trigger_problem.SC2Map 1.1 MiB 82095847caeb...
    #5 Feb 28, 2013 at 22:54 UTC - 0 likes

    You don't need to create a variable for this to work: Look for the function "attribute game value" in your switch, instead of a local variable you added.

    Basically, just remove the local variable "gamemode" you added in your trigger. Remove the "wait" and "set variable" functions at the beginning (which are of no use anymore anyway), then set your switch to use the function "attribute game value", with the parameter "tech level".

    I've done the modifications for you in case you still don't get it, see the attached file. If you want to test it without uploading your map on BNet, you will have to change the default value of your "tech level" game attribute, save, then start the game from the editor. If it still doesn't work, there is probably something wrong with the actions within your switch.

    Last edited Feb 28, 2013 by ZealNaga
    Name Size MD5
    Trigger_problem_fixed_.SC2Map 1.1 MiB 2e10c2589f53...
    #6 Feb 28, 2013 at 23:37 UTC - 0 likes

    @ZealNaga: Go

    Great! thanks I'm just preparing the full map with this and I'm going to test it.

  • 6 posts

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