Dan
The New Helper.Net gives me great Anxiety... o.O;;
- Reaction score
- 159
Interesting find:
in this you will notice that I am having to use a global variable "ListBoxSelection" of type integer in order to fix a problem that occurs when running the event type "Dialog - (Used dialog item) is Changed Selection by Player Any Player".
what happens without the global variable condition added is that the current list selection is continually counted as an event (periodically) instead of only firing after a change in selection (which is preferred). The problem I was facing without the global was that my action "generate tech list" was repeatedly being re-run for the current list selection.
Code:
TechMenu: Detect ListBox Selection
Events
Dialog - (Used dialog item) is Changed Selection by Player Any Player
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
[COLOR="Red"][B]ListBoxSelection != 1[/B][/COLOR]
(Selected list item of TechTypesDropdown for (Triggering player)) == 1
Then
[COLOR="red"][B]Variable - Set ListBoxSelection = 1[/B][/COLOR]
TechMenu: Generate Tech List((Player group(Triggering Player)), 1)
Else
in this you will notice that I am having to use a global variable "ListBoxSelection" of type integer in order to fix a problem that occurs when running the event type "Dialog - (Used dialog item) is Changed Selection by Player Any Player".
what happens without the global variable condition added is that the current list selection is continually counted as an event (periodically) instead of only firing after a change in selection (which is preferred). The problem I was facing without the global was that my action "generate tech list" was repeatedly being re-run for the current list selection.