Alright. The time has come to start addressing some trigger related issues again. I'll be coming back to the previous UI issues in the future. Not given up, but there is some more important issues at hand. Todays issue is one with a critical problem. First I need to explain something. In the mod I am making there is multiple factions. I use a faction select screen with a timer integer that is automatically reduced by using a repeat wait 1 second action. You can see it here:
Keep note of Timer =10 and player_int.
So its not a standard built in timer per say. You can see how I have time reduced here. This timer is also displayed as text in the faction screen and once the timer hits zero, melee conditions are enabled, sounds for each faction start and all of the important stuff is done. Now I am facing two core problems here as follows:
Problem 1: When at least 3 people at playing the game, the wrong music shows up for some players. Everyone is getting the proper bases, but not music. However when 1 or 2 people play the game the music always seems to work fine, but I will admit that more testing is needed to be certain.
Problem 2: When someone picks a race, all the buttons race selection buttons disabled for that player. Sometimes though the buttons seem to be getting disabled for different players. This almost always happens to the last person who tries to pick a race.
*It should be noted though that I am not certain yet if these glitches were caused by the map we were playing on and the main file I was using had ZombieFest(mod compatible) attached. Of course this could have lead to the problem, but I am still not sure yet. What I would like to know is if anyone may have an idea what could be causing the problem here based on these screenshots or if it should be working properly for all purposes.
This is the start of the action chain. You'll notice its a repeat action.
The part where the music is created. Covert ops, raiders etc are presets. Obviously this stuff can be hard to tell from an outsider perspective, but I am just hoping there is maybe something I can figure out here.
Ah yes. That was a mistake I discovered earlier and fixed. Its now disabled, but the music is still often playing for the wrong player. The music needs to be playing for each player that picked a faction. The way I have music selected for a player is by having a local variable called player_int.
Now I think I have this set up in the wrong way somehow. I am not sure.
Also I have one more question for today if possible. This one is simple I think to someone who would know which is why I am asking now.
1. How to avoid deleting ai with my clear default triggers trigger.
This is what the cleardefaulttriggers setup looks like. When you taught me about using or conditions I excluded a lot of stuff. Now basically what I need to know, is about how I would exclude a computer owned structure from getting deleted? If I can do this, then basic ai should be finally functional.
The time comes very soon that I will be returning to resolve this previous UI issues we were discussing earlier. First I want to see if I can resolve an issue that has been bugging for a while. I do have a question though for now. My question is about the supply count ui and resource count ui.
1. How to move and change the image of these?
For each faction, I want there to be a different supply ui image. I also wanted to know how to change the location of these should I decide to put it elsewhere. This is mainly cause I was thinking of putting a toolbar at the top of the screen.
This helped me out a lot. I now understand where I need to be looking and have a basic understanding of how the ui is normally change. The problem is though that I don't want to change the UI for everyone in the game so overwriting it like that I think wouldn't be the right move. I want to change the UI based on the faction that a person has picked with different icons. Keeping this mind, here is todays questions. I have a bunch today.
Problem 1: Directly trying to change the XML code doesn't seem to be working.
I tried to change the XML code. When I tried to type, it just wouldn't let me change anything. I don't know of this is a Mac specific issue, but I feel more like its something I don't know how to do yet. I recall you said that XML now allegedly compiles correctly? Would I need to use something like notepad then import it to overwrite the data? Otherwise, how would I edit the XML?
Problem 2: Complications creating a new layout.
In that tutorial, one of the first things it tells you to do is create a new layout. I tried to create a new layout the copy and past the code in the first part to the layout. At first, the name of the layout did not show up at all. When I tried to save it, the editor just crashed. I've been doing this on an experimental file for now just to be safe. My question basically is, what is possibly preventing the new layout from being created and what is needed to make a new layout that won't cause the game to crash?
3. Understanding the important triggers and how ui is overwritten for a specific player:
What I was noticing is that the calls-down panels for the console ui would not work when I removed the create a panel and hook up and existing portrait part. I assume that I need to do something similar to this to overwrite the console ui and resource panel ui since that is basically what I want to do for each. What I gather is that in the new layout created that how it is overwritten. Would this be correct for each of them? Also, what specifically would be done for overwriting existing ui in the case of changing it only for specific players.
4. Fixing Issues with the buttons
Right now the images on buttons are showing up like this:
I have it set up like this:
and the caster unit I am using looks like this:
the caster unit doesn't have a specified object type and it a base unit. No actors. However the moment I changed the unit to Alexei Stukov, it started looking like this:
The things I'd like to know about this:
4.1 How do I get the buttons to show up properly?
4.2 How do I limit control the amount of buttons that are set up there.
4.3 How do I change the offset of some of these buttons?
4.4 What should be the reason that the buttons aren't showing up at all for the test caster, but rather stukov?
You hookup the UI then you can change the texture used for the Image UI element for specific players.
You should be able to edit the XML directly in the UI editor. Otherwise save the map as a SC2Component folder and use Notepad++ or something similar.
2. If you Right click the list of layouts you should just be able to select Add layout and name it. The rest can be done using Notepad++.
3. You can show/hide specific dialogs for specific players. The console UI will be tricky but with the resource panel you just hook it up and then you can use the Set Dialog Item Image trigger action for specific players. The console panel models are automatically set based on the import file path https://sc2mapster.gamepedia.com/UI/Referencing gives some clues as to how to do it. You can also create a .txt file called Assets under the GameData folder of a SC2Component folder and use that to reroute textures for different races (eg. UI/ConsoleModelCommandPanel_Terr=Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_02.m3). You can then link specific UIs to dummy races and set them based on the selected faction. Whole screen cutscenes could also work.
4.1. seems the default image is not being removed which indicates the individual buttons are not being hooked up correctly.
4.2. The buttons shown in the command panel are set based on the command card of the caster unit added to the group. The number and positioning is determined by the UI layout.
4.3. Again set by the anchors of the UI layout.
4.4. They did show up as can be seen by the hotkey letters just the image is not being shown. Again this indicates the hide animation for the EmptyImages of the UI layout are not working correctly. The lower Stukov buttons are showing because they are using unmodified command panel buttons.