I want to before my map starts to create a box with with the upgrades from the campaign and give player 1 the opportunity to select 10 of these upgrades. would this be done through the dialogue option?
If you want a custom dialogue box, then yes: create a custom dialogue menu. If you want it to occur through the normal action locations in the bottom right, use upgrade buttons and abilities.
You know in the SC2 campaign when on the Hyperion between mission you can go to the bar. And in the bar there is a laptop on a table and you can click on it. When you do you go to a large box with the selection of mercenaries you can hire. Or when you are in the lab and you click on the terminal you bring up the research options in a box, is that done using dialogue or something else? Just curious.
Well, first of all, that's done using story mode. I know little to nothing about the campaign's mechanics. I would assume some sort of dialogue system is used, but I've never messed around with story mode.
I don't really want to go into the campaign/story stuff at this stage. Anyway that is the sort of thing I am after with the dialogue boxes. I will just use the dialogue mechanism and hope to achieve something similar in looks.
I like to think I'm pretty good with the dialogue system. I have a video of my best dialogue work somewhere...
I am almost done with my dialog system. There is only one thing I am still thinking how to do. I have 10 upgrades but I only want player 1 to be able to select 5 of them and then the dialog box closes. Can this be done with a switch? I've seen many dialog examples where people use switches for the actions of the buttons but I am not sure if it will work in my case. Some advice please?
You have a variable called upgradescounter, and you initialize it to the value 5. Whenever P1 selects an upgrade, decrease upgradecounter by 1. Afterward, check if upgradecounter == 0. If it is, close the upgrade dialog.
I have almost finished my dialog now. Everything is positioned right inside the box and all the buttons and images are made and are showing. I have created the two triggers for the dialog. One for the pick upgrade buttons and the other for closing when 5 upgrades are selected. The problem is it is not closing after I pick 5 items. It just stays open.
The first trigger is the one that has the switch in it with the cases for selecting the buttons along with some conditions. I didn't put a default option cause of the second trigger I made. I didn't think I needed one. The second trigger is the one for closing the dialog after 5 upgrades. It starts on the event any dialog item is clicked by player 1. It has the condition to run if the upgrades counter variable is greater than 0. The action is an if else statement saying that if upgrades counter variable is greater than 0 then modify upgrades counter by -1 else hide last created dialog for all players.
Instead, give the second trigger no Event. Then, for the trigger with all of the switch cases, add the action "Run Trigger SECOND TRIGGER" after each successful upgrade purchase.
Still didn't work. I added the run second trigger to each case in the switch in the first trigger and got rid of the event in the second trigger as well.
Do you have your exact code, then? It could be a condition not working, the close dialog action not working...
I found the problem, it was a condition. So that takes care of that. One thing I want to check is whether the units gets the upgrades I select. Is Tech Tree the right category and would allow/disallow upgrade for player be the right chose? Is there something else I need to add in the switch statement cause the units show no sign of the chosen 5 upgrades working in game?
I think Allow/Disallow simply makes it so that a player has the capacity to attain the upgrade, but does not explicitly grant the upgrade.
Would apply campaign tech under story mode category fix the issue? I don't know what else to choose. There is nothing under the unit category which I can see that would be of any help. There are only things for allowing/disallowing and enabling and disabling upgrades, abilities and behaviors and adding upgrade levels in the tech tree category.