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.
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
Rollback Post to RevisionRollBack
I like the lore. Check my latest projects at:
My Profile and My Team
@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.
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.
Rollback Post to RevisionRollBack
I like the lore. Check my latest projects at:
My Profile and My Team
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.
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
@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.
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.
@SoulFilcher: Go
Here's the file.
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.
@ZealNaga: Go
Great! thanks I'm just preparing the full map with this and I'm going to test it.