Well, you'd have to compare it to using the 'Combine Strings (multiple)' function. I don't think anyone would openly recommend 'Combine Strings' for combining more than two.
- Registered User
Member for 10 years
Last active Tue, Jul, 18 2017 15:14:54
- 0 Followers
- 336 Total Posts
- 0 Thanks
Apr 21, 2014_ForgeUser8164555 posted a message on Insert words stored in variables into a dialog text?Posted in: Triggers
Apr 20, 2014_ForgeUser8164555 posted a message on feedback on loading screen [non-artistic] questionPosted in: Map Feedback
@somen00b: Go For the long loading time, I've heard of prolonged loading times being associated with the event 'Map Initialization.' Personally, I haven't observed any difference in loading time. Not that I've looked into it very much. You'd probably have to test it on Battle.net to see if it works, but an easy way to try this would be to make a custom event that fires when the mission time reaches zero (I don't recall what the name of the event is), and then control-f and replace all your 'Map Initialization's with your custom event definition. If it were to fix the loading time length, I bet it would fix the dropping as well.
For the dropping, I'd make a list of things that you've done anywhere in your map that are unusual/uncommon. I was getting a weird crash bug, where my SC2 client would crash upon loading a specific map about 10% of the time, randomly. I was finally able to confirm that it was because I was extending the default chat bar edit box to 2000. Look for things you've done in data/triggers (I've heard of imports also causing problems, but I don't think that's likely) that are rather extreme/unconventional.
Quote from FunkyUserName: Go
... to see which players are loading and which not to exclude the possibility of a lagging player.
Unless it's the same set of players who are dropping each time, I wouldn't say it's a local issue.
Apr 20, 2014Posted in: General Chat
It seems like they're all separate, legitimate companies, ran by the same man: Mance Raider (jk, Vance Miller), who has a terrible reputation, and is known as the "kitchen gangster." I'm guessing, due to the crappy sites for all the kitchen companies, that he's hiring a very cheap advertising company that's employing said tactics.
Apr 19, 2014_ForgeUser8164555 posted a message on Insert words stored in variables into a dialog text?Posted in: Triggers
For one of my projects, I made my own function called 'String with Keywords of Color,' which had three parameters, the main string, the key words (any amount, separated by spaces), and color. It colored all of the specified key words in the main strings to the input color. It was really easy and time efficient to do it that way, because I never needed to worry about all the 'combine strings.' I simply put the string, and then the key words.
You could make a similar function that replaces a placeholder substring in a main string. It would look roughly like:
mainstring (parent): "Hi, Ive lost my #lostitem at the grand canyon. Can you retrieve it for me?" replace strings: "#lostitem;weapon"
Apr 17, 2014Posted in: General Chat
There were lots of people. I counted 30, not including the Blizzard reps, when it started. It seemed rather successful, though towards the end a person or two complained about the lack of turnout. Many people left the event chat when their games started, all three of the Blizzard reps did so, so it may have seemed as though less people were there than there actually were.
At all times there were least two games being played, I believe, sometimes more. Some people who needed more players (8+) for their lobbies had to spam a bit, in spite of the Blizzard reps saying that any game being played shouldn't have more than 6 required.
The Blizzard reps were rather friendly. All three stayed the full two hours. They repeated several times that they couldn't give feedback due to them being the judges in the competition. They were definitely a positive influence on the event as a whole (they did plan it, after all), but I felt that people demanded their presence in their lobbies too much, in light of the fact that they were not allowed to give feedback. At least when it started, it seemed structured but as the event went on, they cared less about the structure (it wasn't really needed, not too many people were trying to start games at any given time.) Oddly, it seemed like at the end there was a large increase in the amount of people trying to get games started.
Unfortunately, I had seen most of the maps during Mapster map nights and I was rather unimpressed with some of the newer ones. I guess I had my standards set a little too high, but nothing was really out of the box, or especially interesting. The fun I had came from playing with friends and the community being together, only in part from the maps I played. =(
Apr 16, 2014Posted in: Triggers
In more detail:
You'll need these components:
- The interface
- Click actions
- Outcome determination
- - - - - - -
We'll only need one trigger for the interface. We'll go with five buttons; one for each mode, and one to accept.
But first, we need to create some variables. Variables are what you use to store information and basically lots of other stuff.
- Create a new global variable (global means you create it where the triggers are listed, not in a trigger). Let's name it 'Voting Dialog.' Click on the 'Type' dropdown list and select 'Dialog.'
- Create another global variable. Let's call it 'Voting Button.' Change the type to dialog item. Make it arrayed (check the 'arrayed' button). Leave the dimension alone, but change the 'Size' to 4. By making it arrayed in one dimension with a size of 4, we've basically made 4 copies of one variable.
- Create another global variable. Let's call it 'Voting Submit.' Change the type to dialog item. Don't make it arrayed.
- Create another global variable. Let's call it 'Voting Difficulty Names.' Set the type to 'String.' Make it arrayed in one dimension (the default) with a size of four.
- Create another global variable. Let's call it 'Voting Difficulty Colors.' Set the type to 'Color.' Make it arrayed in one dimension with again, a size of four.
Now we need to give some of our variables default values.
- Create a new trigger. (Make sure it's before the 'Voting Dialog Trigger'). Let's call it 'Voting Data.' For the event, put 'Map Initialization.' The purpose of this trigger is to set some information for our dialog creation trigger. All the actions in this trigger are going to be 'Set Variable.'
- Create the action in the trigger called 'Set Variable.' Change the variable parameter to the 'Voting Difficulty Names' variable. There should be a '' listed after it. Change it to '1'. For the second part of the action after the '=,' put the name of the first difficulty, which, let's call, 'Easy.'
- Copy and paste this action three times, each time adjusting the index of the variable to be one higher and changing the difficulty text to the next difficulty. You should end at 4.
- Do the same thing for colors. Give each difficulty a color.
Now that we have the background information set, we can move on to creating the interface for voting.
- Create a new trigger. Let's call it 'Voting Dialog.' For the event, put 'Map Initialization.'
- In the actions, create the action 'Create Dialog.' Leave the modal/non-modal preset as the default 'Modal.' Let's anchor it to the top left, with a small offset. Put 50 for both the x and y offsets, and change the anchor to 'Top Left.' It'll look better narrower, so let's change the X and Y sizes to 200 by 300. The X (width) comes first.
- Create the action 'Set Variable.' Set the variable (first parameter) to the variable we made called 'Voting Dialog.' After the '=,' put Last Created Dialog. We've now given ourselves a way of retrieving the dialog we created by referencing the variable we made earlier, by setting it to the dialog we just created.
- Create the action 'Show/Hide Dialog.' Keep the dialog parameter in it as 'Last Created Dialog.' When dialogs are created, they are hidden by default. They have to be shown to a set of players, or one player specifically. So keep 'All Players' the same.
Now we have our dialog created. Keep in mind, the dialog is just the container for the dialog items, which are really what interface is about.
We should give our dialog a title.
- Create the action 'Create Dialog Item (Label).'
- The only two things we need to change are the offset and text. Set the offset to 27, 27.
- Set the text to 'Difficulty.'
Now we need to create our difficulty buttons.
- Create the action 'Pick Each Integer.' Set the 'Start' parameter to '1' and the 'End' parameter to '4.' This is called a loop. A loop repeats the actions listed in it until it's stopped, if ever. This loop will stop after it's fourth time running and will make the function 'Picked Integer' to the current integer it's on. In this case it will pick 1, 2, 3, and 4. Each time, the picked integer function will return the corresponding integer.
- In the loop, create the action 'Create Dialog Item (Button).' Set the size to '(150, 50).' Set the anchor to 'Top.' Set the X offset to '0.' For the Y offset, click on it and select the function 'Arithmetic (Integer).' Set the operator (middle sign) to times ('*') and set the first integer parameter to the function 'Picked Integer,' and the other to 47. That spaces the buttons equally at consecutive distances on the y-axis (vertically). Click on the button text and it to the function 'Text with Color.' For the text parameter, put in the 'Convert to String' function and then click on the string parameter, where you put in the arrayed string variable we made earlier 'Voting Difficulty Names.' For the index , put in picked integer. For the color parameter, put in the variable we made earlier, 'Voting Difficulty Colors' and again, put picked integer into the array index (). This made the buttons.
- Create again the set variable action. Set the variable we made 'Voting Buttons' at the index Picked Integer to 'Last Created Dialog Item.' This wraps it up for the loop. The buttons have been made and assigned a variable.
To make the submit button:
- Copy and paste the create button action use in the loop. Change the anchor to Bottom, size Y to 40, and the Y offset to a value of 23 (no need for expressions).
- Create the action 'Set Variable' and set the variable we made earlier 'Voting Submit' to 'Last Created Dialog Item.'
- Create the action 'Show/Hide Dialog Item' and hide the last created dialog item. We want it hidden because we don't want people clicking it before they've selected a mode.
The interface is finished!
2. Click Actions
We'll need a variable to store the currently selected difficulty of the players.
- Create a new global variable and set it to type 'Integer.' Let's call it 'Selected Difficulty.' Set it to an array of one dimension of size '14.'
Now we need the trigger for when a player clicks a difficulty.
- Create a new trigger. Let's call it 'Voting Select.' For the event, put 'Dialog Item is Used.' The default values don't need to be changed.
- For the actions, create the action 'Pick Each Integer.' In the loop, create the action 'If Then Else.' In the if, create a condition of comparison. For the first parameter in the first part, put 'Used Dialog Item.' For the second part, put the variable we created 'Voting Button.' Set the index ('') to 'Picked Integer'.
- For the then part of the 'If Then Else', create the action 'Show/Hide Dialog Item.' Show the button we started off as hidden, the one we saved as the variable 'Voting Submit.'
- Also create the action 'Set Variable.' Set the variable 'Selected Difficulty' at the index of the function 'Triggering Player' to the function 'Picked Integer.'
Now when a player selected a difficulty, it stores their selection, as well as shows the submit button.
To make it so when a player clicks select, the dialog disappears:
- In the same trigger, create another action 'If Then Else' (not in the loop). For the condition, the same condition as the one in the loop, but instead of the variable 'Voting Button,' put 'Voting Submit.' As you'll notice, the array index field will disappear, which is fine, as there is only a single voting submit button.
- For the only action in this 'If Then Else,' create 'Show/Hide Dialog.' For the show/hide preset, put 'Hide' and for the dialog parameter, put our variable 'Voting Dialog.' For the player group, put the function 'Convert Player to Player Group' and put 'Triggering Player.'
When a player clicks the submit button, the dialog will disappear.
- - - --
Should help. I'm working on typing properly with my fingers on the home keys, which is why I tried to write so much.
Apr 16, 2014Posted in: Triggers
Welcome to master!
Decide on the names. You'll need a name for the bank and a name for the section. I like to use the same section for everything and use string presets to recall the keys, as well as using my own save bank integer definition that saves everything by default to the static section and bank, and automatically gives me my preset list of keys. Really saves time.
Once you have the bank name, go to -> maps -> preload info -> banks -> -add your bank's name for all players.
Now your bank is preloaded. However, we still need a way to retrieve it. Make an arrayed variable of type 'Bank.' I'd set the size to 14. Then:
- Make a map initialization trigger.
- Create a pick each player loop.
- Open the bank (the bank's name you chose earlier) for the picked player.
- Save the arrayed bank variable with the index set to the picked player to the last opened bank.
Now you have a way to retrieve each individual player's bank. Everything should be ready at this point.
(I'm assuming by achievements for the stats, you mean the player get's an achievement at reaching a certain amount of stats).
First, we need a way to store the stats.
- Come up with a name for the keys of the stats. (for example: "Unit's Created," "Unit's Killed," "Games Won," "Games Lost."). I've heard you're not supposed to use spaces in bank keys/section strings but I've never had a problem with it.
- Make a trigger with an event for when each of the stat changes occur (unit is killed/game lost/game won/unit is created) and save the integer in the key of the name you came up with to be 1 plus itself.
The simplest way without custom definitions I can think of:
- Create an arrayed string variable (size 10+) and an arrayed integer variable (size 10+), and a non-arrayed integer variable. The arrayed string variable will serve as storage for the key for each achievement. The arrayed integer variable will serve as storage for the achievement points of each achievement.
- Assign each achievement a number (ideally consecutively i.e. [1, 2, 3, 4...]. Set the non-arrayed integer variable to the highest ID.
- Using that number (or ID), assign the arrayed string variable as the key, and the arrayed integer variable as the achievement points. The index in the arrayed string and integer variables should be the ID of the achievement. Each achievement ID should be used twice for each variable.
When you want to award an achievement, you save 'true' as the string variable at the index of the ID of the achievement you want to award.
When you want to count the player's achievement points, you perform a loop from 1 to your highest ID you've set for an achievement (or the non-arrayed integer variable). If the player has 'true' stored in the bank with the key set to the arrayed string variable with the index set to the picked integer, you add the achievement points listed in the arrayed integer at the index of the picked integer to a local counter.
- - - - -
Information is stored in banks under a section and key. Sections are like the aisles and keys are like the shelves in that aisle. You can use the same section for all the stored data, and only use keys, which is what I do. If you always use the same bank and section in a map, it works, essentially, the same way as a data table.
Each bank has a limit of 1 mb (or so). That's more than enough for most conventional needs.
You have to save a bank for the changes to be final, should the player leave and join again. Saving a bank is the actual updating of the text file in the player's documents. (documents/starcraft 2/"player's profile"/banks/"publisher's handle id"/"saved bank name"). In a test map when you're not logged in, the banks are just saved in the banks folder in SC2 in your documents.
Apr 14, 2014Posted in: General Chat
Quote from yukaboy: Go
Encouraging mapmakers to do partnerships would be fun and somewhat unique, though that means more of the community needs to get involved.
I'd say it means more of the community would be involved, not that more of the community needs to be involved. I doubt people are only going to ask to partner up with those they know are participating already.
Apr 14, 2014Posted in: General Chat
I'd participate if we could have partners, themes were kept rather loose, and no more than 3 days were allowed. I'm fine if it's on an honor system, whether someone actually started the project in those three days or before.
To the nonbelievers, you never know until you try it.
Apr 9, 2014Posted in: Triggers
I know, I tried it a long time ago and it didn't work. Incidentally, I tried it yesterday and it didn't work then either. Both times I had expressions, so I had other issues I didn't both to check.
Anyway, I'm glad you mentioned that. It'll help very much not having to do the extra math to flip the current integer.
Apr 8, 2014Posted in: Triggers
Yep, computers count as players when you use Active Players. It's actually really useful when testing and you need to see how something works with multiple players.
Unless you need said computer to use command units/use their abilities (AI), it's usually a good idea to omit them, in general. It also just looks better in lobby, cleaner and stuff.
- To post a comment, please login or register a new account.