I would like to create a dialog "Shop" with 30 items to buy and 1 trigger to run it! Something like this..
Events
- Dialog item is used
Conditions
- 1<= (used dialog item
"SHOP"[30]) =<30
-
"Players Money" >= "Shop Item Value"[returned array of
"SHOP"]
Actions
- Modify variable
"Players Money" - "Shop Item Value"[returned array of
"SHOP"]
- etc etc
And i would set "Shop Item Value"[30] pre-hand to each Item's value.
---I need a way to return the array value used in a variable with arrays! If you understand---I could also use a looped action to determine if it was the used dialog item like this..
For Each Integer "Counter" 1-30
-If: Used Dialog Item = Counter
-Then: Set Local Variable = Counterbut then my Event would have to be "Dialog item is used" with no conditions and i have multiple dialogs and i think that would lag.
I'm not sure but "Catalog Field Value Count" might be my answer but i'm not sure how it works..
None.
I'm not at my computer to really go into detail, but you should use the "If, then, if" action under General so that you can use Conditions in the Actions area to determine which item is being purchased.
Currently Working On: My Overwatch addiction.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
I'm using 1 trigger with a generic event.
Then I check all dialog items (which are buttons) with loops to find out which has been used.
When I found it, I'm starting a custom action definition which takes the player and the button's ID in the array as a parameter.
What really happens when the button is clicked, is controlled by that custom action definition.
I'm using 1 trigger with a generic event.
Then I check all dialog items (which are buttons) with loops to find out which has been used.
When I found it, I'm starting a custom action definition which takes the player and the button's ID in the array as a parameter.
What really happens when the button is clicked, is controlled by that custom action definition.
Can i see an example? ^
i tried setting the items current dialog item value to 1 - 30 and using these 2 conditions:
1<= (used dialog item current value) <=30
Dialog containing dialog item
and that worked but when i clicked other dialog's items, my trigger came back "error cannot get value" even though the dialog containing was different.
The condition "Dialog containing dialog item" doesnt seem to be able to tell my dialogs apart.
If i can somehow save each dialog item as a string 1-30 and then use a "within bounds" condition to recall then that would be great. something like:
1<= (sting integer from string) <=30
None.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
1. Completely generic event
2. check which dialog is visible for the player (-> visible == dialog's buttons are clickable)
3. compare buttons with the used one
4. pass information somewhere else to do the magic because your trigger can become very long with many dialogs and it should only find out which button in which dialog was used.
1. Completely generic event
2. check which dialog is visible for the player (-> visible == dialog's buttons are clickable)
3. compare buttons with the used one
What if i have multiple dialogs open which i do?
4. pass information somewhere else to do the magic because your trigger can become very long with many dialogs and it should only find out which button in which dialog was used.
This seems too complex or i just don't understand it. I can do this if i can just figure out out to have the system take a # from a string with letters as well
I can store 30 strings such as Shop01 Shop02 Shop03 etc and a "within bounds" condition to check it.
So is there a way to return which array of the variable was used or to return numbers out of strings?
What about a preset that allows all arrays in a variable to be true such as: used dialog item"SHOP"[any]?
None.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
1. Completely generic event
2. check which dialog is visible for the player (-> visible == dialog's buttons are clickable)
3. compare buttons with the used one
What if i have multiple dialogs open which i do?
You check all buttons and someday you find the right one and execute all necessary actions from there. Action definitions are just a more modular way of writing down the code that should be executed.
The approach that I use is to search till you find the used button by button comparison. AfaIk that's the way other mappers do it, too.
4. pass information somewhere else to do the magic because your trigger can become very long with many dialogs and it should only find out which button in which dialog was used.
This seems too complex or i just don't understand it. I can do this if i can just figure out out to have the system take a # from a string with letters as well
I can store 30 strings such as Shop01 Shop02 Shop03 etc and a "within bounds" condition to check it.
So is there a way to return which array of the variable was used or to return numbers out of strings?
What about a preset that allows all arrays in a variable to be true such as: used dialog item"SHOP"[any]?
The conversion String to Integer should exist.
But I don't quite understand how you imagine it to work. I guess you want to analyze the string you get somehow to determine the window. Then you want to get the number you somehow store in the button to get the array's list?
If you try to form the string and the number directly into a reference for an array, that won't work.
Well the reason that i am getting error messages is because if i click on a dialog item that has never had a "Current value" set via triggers, then it returns errors..
So i have to leave it as following:
Events
-dialog item is used
Conditions
-Dialog of Dialog Item = SHOP
Actions
-Set local variable "DValue" = current value of Dialog item used
-If Then Else bla bla bla
I think blizzard might want to set the default value of Dialog Items = 0 so that they will atleast not return errors
None.