Basically for a form of Card Game, at the bottom of the screen I have up to 8 Dialog Slots which represent card slots. As you draw a card one of the unoccupied Dialog Slots at the bottom changes, I alter the Text and add an image to represent you holding a card.
So now I'm at the next stage where I want things to happen when you click on those 'cards' / dialog slots. There doesn't seem to be a basic condition just for 'is Dialog Item text == ?', so I can Identify what Card a player is clicking on. Then I can easily make a trigger per unique card with different actions when you click it.
How would you go about it? If anythings unclear I can give more details, thanks.
Yea that's how I've done it actually. I have blank buttons that I alter as they becomes a card, changing the text and also placing an image over them. Looking for a simple way to identify what the text is when a guy clicks one of these buttons.
I think I've thought of a way around it:
- There are 8 buttons down below (card slots), I've got stored in a dialog item array per player.
- When a card button (empty slot) becomes an actual card and I alter it as necessary I'll also store the text and details of that card in a separate string array variable.
- When a guy clicks on one of his cards/button, I'll run a loop checking until I've found which card slot/array slot it actually is.
- I'll match that number with the string variable array I stored the details in to find out which card he's actually clicking on.
- I should now be able to make a trigger per card as you click on them, making 'something happen'.
I solved this problem in my map by using Set/Get Dialog Item Style. Just make sure you don't have any text directly in your button and changing the style shouldn't effect the apperance at all.
Dialog - Set (Last created dialog item) style to "CardButton1" for (All players)
(Style of (Used dialog item) for (Triggering player)) == "CardButton1"
Basically for a form of Card Game, at the bottom of the screen I have up to 8 Dialog Slots which represent card slots. As you draw a card one of the unoccupied Dialog Slots at the bottom changes, I alter the Text and add an image to represent you holding a card.
So now I'm at the next stage where I want things to happen when you click on those 'cards' / dialog slots. There doesn't seem to be a basic condition just for 'is Dialog Item text == ?', so I can Identify what Card a player is clicking on. Then I can easily make a trigger per unique card with different actions when you click it.
How would you go about it? If anythings unclear I can give more details, thanks.
I'm thinking, how about making a button ontop of the card image?
Yea that's how I've done it actually. I have blank buttons that I alter as they becomes a card, changing the text and also placing an image over them. Looking for a simple way to identify what the text is when a guy clicks one of these buttons.
I think I've thought of a way around it: - There are 8 buttons down below (card slots), I've got stored in a dialog item array per player. - When a card button (empty slot) becomes an actual card and I alter it as necessary I'll also store the text and details of that card in a separate string array variable. - When a guy clicks on one of his cards/button, I'll run a loop checking until I've found which card slot/array slot it actually is. - I'll match that number with the string variable array I stored the details in to find out which card he's actually clicking on. - I should now be able to make a trigger per card as you click on them, making 'something happen'.
Any better ideas, very open to suggestions :)
Why not make it so that the button has the text. But the image overlays the button. So then you can just use the function DialogItemText();
That's exactly what I've done, where is this DialogItemText() ?
I can't find a condition this?
That's the function in galaxy. Look in the library under Dialog -> Dialog Items -> Dialog Item Text
Oh yea I'm aware of that as an action, I use it and that's how I modify the text on dialog items.
But for Condition it's a different story, I can't seem to just get a simple IsDialogText == ''
I solved this problem in my map by using Set/Get Dialog Item Style. Just make sure you don't have any text directly in your button and changing the style shouldn't effect the apperance at all.
Dialog - Set (Last created dialog item) style to "CardButton1" for (All players)
(Style of (Used dialog item) for (Triggering player)) == "CardButton1"
You might be looking for these functions (from Galaxy):
So in GUI you'd make the condition like this (using custom script):
I can't say for sure though, I haven't messed with dialogs that much. But I hope that helps :)
Just to help you a bit:
in my cardmap every card a player is drawing is a single dialog with invisible dialog border
then create a button first of the size the card should be and then create all dialog items on it
dont forget to save all dialog items always into variables and they have to be modified every time drawing or dropping a card!
And when using the card you have to ask which dialog item (button) is used, dont forget to save information in the dialog which card it it!