So I've noticed with several custom games I have played that if you mash the button as fast as you can before it disappears the trigger is executed that many times. As an example, on Red TD you can mash 80% 15 times so that the difficulty remains close to that even if everyone else hits 130% (unless they do the same thing you do, of course).
To those of you making maps, to avoid this, please add a simple variable to your trigger. If it's multiplayer, just make a boolean variable with an array of the number of players. Call it something like ButtonClicked, defaultly false, and have the button trigger set it to true when the button is clicked, and have the actions only trigger if the variable is false for that player.
It's very simple to do, and yes, it may only happen on rare occasion, but it's very possible to exploit some maps. It is especially problematic if it does something like give the initial income, so that if it's pressed several times a lot of income is given.
Yes, you finally found out there are plenty lame coders in the world. Plenty guys who also don't have a clue of what creating a map is like, some who don't even know how to do a terrain (even though it's basically painting). Almost each action that needs to be triggered only once require a "turn current trigger OFF" as the first action, so that it can't be executed more than once unless you toggle it ON again. In case it's a menu option, a boolean with an array equals to the number of players is the easiest way, as you mentioned. People mostly forget that when your map is online, lots of people will play it and lots of them will "stress" your code to the maximum... A few days ago I just tested my minigame online. Everything I expected to bug didn't, but I found out something totally unexpected was wrong. Always expect the unexpected, especially when you're doing your first steps in map editing.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I've noticed with several custom games I have played that if you mash the button as fast as you can before it disappears the trigger is executed that many times. As an example, on Red TD you can mash 80% 15 times so that the difficulty remains close to that even if everyone else hits 130% (unless they do the same thing you do, of course).
To those of you making maps, to avoid this, please add a simple variable to your trigger. If it's multiplayer, just make a boolean variable with an array of the number of players. Call it something like ButtonClicked, defaultly false, and have the button trigger set it to true when the button is clicked, and have the actions only trigger if the variable is false for that player.
It's very simple to do, and yes, it may only happen on rare occasion, but it's very possible to exploit some maps. It is especially problematic if it does something like give the initial income, so that if it's pressed several times a lot of income is given.
Yes, you finally found out there are plenty lame coders in the world. Plenty guys who also don't have a clue of what creating a map is like, some who don't even know how to do a terrain (even though it's basically painting). Almost each action that needs to be triggered only once require a "turn current trigger OFF" as the first action, so that it can't be executed more than once unless you toggle it ON again. In case it's a menu option, a boolean with an array equals to the number of players is the easiest way, as you mentioned. People mostly forget that when your map is online, lots of people will play it and lots of them will "stress" your code to the maximum... A few days ago I just tested my minigame online. Everything I expected to bug didn't, but I found out something totally unexpected was wrong. Always expect the unexpected, especially when you're doing your first steps in map editing.