Just Player Abilities on a cooldown with an interface at the top of the screen. LotV has a number of abilities that can be upgraded and swapped out between missions.
I understand (better) now. If I decide to implement a power system (like the spear of adun abilities), would it be easier to set up a dialog with as many buttons as I choose, or put in screen buttons and fit them to the dialog I make to frame it?
This is how far I got when I decided to mess around with arrays again. So now I'm setting up an initialize trigger for the arrays, and then I have to reset all of my triggers with the new information.
But it works, I just have to fool around with the effects some more to get it just how I want it. I know that constants and variables should be set up before-hand, but I've just been testing different sizes and eyeballing the changes. Would I need to be worried about different.... uhh... resolutions? (widescreen, 4:3, whatever it is now) with just one image and some text?
I dont do any UI editing; but I do a lot of dialog work to make my own UI like stuff.Considering you are setting values for this box with triggers anyway, why not just make a dialog box and use the triggers to update said dialog box?
More specifically, say what you want in the long run, so we can show you other ways of getting there.If what you want is an icon on the screen with a number on it reflecting a variable, yes, use a dialog box.This is 5 minutes worth of work.
I thought dialog was UI? At least, dialog is what I started experimenting with.
And when I first brought this to the UI thread, the information I needed to display didn't need to update. I didn't decide to add the kill counter until I realized it would be better to store all of the information in one place. (One Dialog)
To update it, you either need to run a loop endlessly (use a repeat - forever, with a wait) or trigger specifically when the data is updated.If it is just a simple display, not like HP or something that needs to be specific to the .1 second, using a 1 second loop isnt bad.Having a lot of little repeat loops isnt good though; if you have multiple repeat loops like that, you should combine them all into 1 trigger and put them on their own thread.
As long as there is only one loop running at a time, then it's okay? I have a Boolean "Break" set when the trigger fires, so that it can't be triggered repeatedly, and then when the loop is done, it destroys the dialog and sets the break back to allow it to fire again.
Don't update the UI if you don't have to. Just set the text together when you actually change the value.
Well, the idea is for the dialog text to show a kill count. And the way the map works, it will definitely be changing a lot more often than every 8 seconds...
You need to refresh it yourself by setting the dialog item text.
Is there a specific loop to use, or just copy paste a bunch of waits?
I attempted my first do while loop that had a Boolean break and was supposed to set a progress bar to an integer. Outside the loop was an 8 second wait and then it set the Boolean. The result was that anytime the trigger fired ingame, it froze for 8 seconds and didn't show anything.
I've been toying around with dialog a little bit, and I've come up with a solution that I can live with, after a little more experimentation. I've not even got to the text portion yet, but is there a trick I need to know in advance to make a counter display in real time?
The dialog is supposed to show up for 8 seconds, which it does, but I want one of the text displays to show an actively changing integer value. If I convert the integer into text, will it automatically update as the integer does, or does it need to be "refreshed" every half second or so?
A word of caution: the "pick each..." family of actions suffers from a couple of weird bugs that can cause errors for no apparent reason whatsoever. They cannot be relied upon and as such I recommend getting in the habit of using the "for each..." actions instead.
Interesting. I've actually only stumbled across "for each" once, and it was in the 101 thread about using do while loops. At least I believe the one the TC was comparing it to was "for each". It only compared "while loops" with "for loops".
I'd considered it, but the icons there are something I would actually like to leave as is. The upgrades that normally go there will still be displayed there. If I changed them (the weapon, at least), you would no longer be able to see the unit's damage, correct?
I've been trying to learn a lot of new things for my project, but I'm so swamped with other things that I'm working on that this is something I'd just rather live without than learn from scratch. However, if someone already has something similar that I can borrow and adapt, I'd be eternally grateful.
I need two Inventory style boxes that appear when a unit type is clicked on. All they need to actually do is have an appropriate background icon and display an integer that would be set by triggers. If unit type 1 is clicked, the boxes show up displaying integers 1a and 1b. It doesn't need to be large or impressive. It's just meant to show the user some in game information.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@GlornII: Go
Just Player Abilities on a cooldown with an interface at the top of the screen. LotV has a number of abilities that can be upgraded and swapped out between missions.
@GlornII: Go
I understand (better) now. If I decide to implement a power system (like the spear of adun abilities), would it be easier to set up a dialog with as many buttons as I choose, or put in screen buttons and fit them to the dialog I make to frame it?
So wait. Should I simply hide the dialogue and just SHOW it each time?
@GlornII: Go
It doesn't destroy it each time it updates. It sets a break so that the button that initializes the dialog can't be pressed repeatedly.
This is how far I got when I decided to mess around with arrays again. So now I'm setting up an initialize trigger for the arrays, and then I have to reset all of my triggers with the new information.
But it works, I just have to fool around with the effects some more to get it just how I want it. I know that constants and variables should be set up before-hand, but I've just been testing different sizes and eyeballing the changes. Would I need to be worried about different.... uhh... resolutions? (widescreen, 4:3, whatever it is now) with just one image and some text?
I thought dialog was UI? At least, dialog is what I started experimenting with.
And when I first brought this to the UI thread, the information I needed to display didn't need to update. I didn't decide to add the kill counter until I realized it would be better to store all of the information in one place. (One Dialog)
As long as there is only one loop running at a time, then it's okay? I have a Boolean "Break" set when the trigger fires, so that it can't be triggered repeatedly, and then when the loop is done, it destroys the dialog and sets the break back to allow it to fire again.
Well, the idea is for the dialog text to show a kill count. And the way the map works, it will definitely be changing a lot more often than every 8 seconds...
Is there a specific loop to use, or just copy paste a bunch of waits?
I attempted my first do while loop that had a Boolean break and was supposed to set a progress bar to an integer. Outside the loop was an 8 second wait and then it set the Boolean. The result was that anytime the trigger fired ingame, it froze for 8 seconds and didn't show anything.
@temhawk: Go
I've been toying around with dialog a little bit, and I've come up with a solution that I can live with, after a little more experimentation. I've not even got to the text portion yet, but is there a trick I need to know in advance to make a counter display in real time?
The dialog is supposed to show up for 8 seconds, which it does, but I want one of the text displays to show an actively changing integer value. If I convert the integer into text, will it automatically update as the integer does, or does it need to be "refreshed" every half second or so?
That is absolutely perfect. I still haven't decided what kind of icon I want in the background, But that style is exactly what I'm looking for.
Interesting. I've actually only stumbled across "for each" once, and it was in the 101 thread about using do while loops. At least I believe the one the TC was comparing it to was "for each". It only compared "while loops" with "for loops".
@temhawk: Go
I'd considered it, but the icons there are something I would actually like to leave as is. The upgrades that normally go there will still be displayed there. If I changed them (the weapon, at least), you would no longer be able to see the unit's damage, correct?
I've been trying to learn a lot of new things for my project, but I'm so swamped with other things that I'm working on that this is something I'd just rather live without than learn from scratch. However, if someone already has something similar that I can borrow and adapt, I'd be eternally grateful.
I need two Inventory style boxes that appear when a unit type is clicked on. All they need to actually do is have an appropriate background icon and display an integer that would be set by triggers. If unit type 1 is clicked, the boxes show up displaying integers 1a and 1b. It doesn't need to be large or impressive. It's just meant to show the user some in game information.