Looking for an example of how you would add another one of these to the ingame menu bar. I know it has to do with sc2layout files and I am somewhat familiar with the process (thanks to using custom fonts), but is there a tutorial that explains how to do this exactly? I've looked around and most sc2layout tutorials explain how to reposition and hide some stuff, but none of them cover handling a button click to invoke my own custom dialog with the menu bar button is clicked.
I have no experience with functions that deal with units, so this is basically going to be a request for a completed trigger that I can use as a starting point and to learn from.
So, can someone post a trigger that would loop through all buildings owned by a given player, totalling up the mineral cost of each building and printing the total amount to the screen?
Is it possible to disallow the game from starting depending on the number of players on each team? Example being I don't want to let the host start my map if its 1v0
Is there any function to draw/use only a specified region of an image as a button's image or something like that? Instead of always using the entire image and then scaling it by default?
yeah i think im gonna go with a decoy button. it works and everything just fine, but i would like to disable being able to click on it just so i can use its hover feature only. Any idea how to do that? I have it disguised exactly like an image right now, but when you click on it it makes the ding sound still because its a button.
EDIT
hahahaha got it! Nevermind! Here's the two lines that were key:
TriggerAddEventDialogControl using c_triggerControlEventTypeMouseEnter
libNtve_gf_SetDialogItemAcceptMouse
I was interested in something similar to this. Is it possible to make only one type of unit not able to cross a boundary? (Not teleporting triggers, just collision with the no-path for that unit only)
Definitely. This is as easy as changing a button's tooltip in galaxy script, though I can't provide any examples because it would require a backend ability leveling up system... which would take a while (but is still doable).
Galaxy doesn't support dynamic memory, so the size of your array will never change. You can use invalid values to indicate that spot is "empty" if you want. My solution is to use strings with some sort of delimiter for my integer arrays... like "1 404 193 04 2 40 2"
That sounds sweet! Like a Data Editor but for my own types. Yes, I'll look into that as I think that's exactly what I need. This database information I'm storing is constant, so won't need write access, only read.
Since SC2 doesn't allow actual file I/O (other than banks), does the API allow any way to read information from a resource as in a text file I added to the map with the Import Manager? Just looking for alternatives to hard-coding database information right into my custom script source code.
0
@BasharTeg: Go
const int c_triggerControlEventTypeMouseEnter = 6;
const int c_triggerControlEventTypeMouseExit = 7;
These can be used for any desired hover effect, though I don't think this pertain to the OP.
0
aw damn, thanks guys
0
from what i've found, this is not possible. Best next thing is trigger checking once ingame.
0
Looking for an example of how you would add another one of these to the ingame menu bar. I know it has to do with sc2layout files and I am somewhat familiar with the process (thanks to using custom fonts), but is there a tutorial that explains how to do this exactly? I've looked around and most sc2layout tutorials explain how to reposition and hide some stuff, but none of them cover handling a button click to invoke my own custom dialog with the menu bar button is clicked.
0
I have no experience with functions that deal with units, so this is basically going to be a request for a completed trigger that I can use as a starting point and to learn from.
So, can someone post a trigger that would loop through all buildings owned by a given player, totalling up the mineral cost of each building and printing the total amount to the screen?
0
Is it possible to disallow the game from starting depending on the number of players on each team? Example being I don't want to let the host start my map if its 1v0
0
@SouLCarveRR: Go
Unfortunately this method is not possible for something like a custom progress bar. Would need variable regional image drawing.
0
Is there any function to draw/use only a specified region of an image as a button's image or something like that? Instead of always using the entire image and then scaling it by default?
0
@hobbidude: Go
yeah i think im gonna go with a decoy button. it works and everything just fine, but i would like to disable being able to click on it just so i can use its hover feature only. Any idea how to do that? I have it disguised exactly like an image right now, but when you click on it it makes the ding sound still because its a button.
EDIT
hahahaha got it! Nevermind! Here's the two lines that were key:
TriggerAddEventDialogControl using c_triggerControlEventTypeMouseEnter
libNtve_gf_SetDialogItemAcceptMouse
0
Is it possible to make a normal image change when you hover over it?
0
I was interested in something similar to this. Is it possible to make only one type of unit not able to cross a boundary? (Not teleporting triggers, just collision with the no-path for that unit only)
0
@KorvinGump: Go
Definitely. This is as easy as changing a button's tooltip in galaxy script, though I can't provide any examples because it would require a backend ability leveling up system... which would take a while (but is still doable).
0
@farban6: Go
Galaxy doesn't support dynamic memory, so the size of your array will never change. You can use invalid values to indicate that spot is "empty" if you want. My solution is to use strings with some sort of delimiter for my integer arrays... like "1 404 193 04 2 40 2"
0
@TheAlmaity: Go
That sounds sweet! Like a Data Editor but for my own types. Yes, I'll look into that as I think that's exactly what I need. This database information I'm storing is constant, so won't need write access, only read.
0
Since SC2 doesn't allow actual file I/O (other than banks), does the API allow any way to read information from a resource as in a text file I added to the map with the Import Manager? Just looking for alternatives to hard-coding database information right into my custom script source code.