Hi,
I am new to the galaxy editor and trying to finish this hero selection. I have learned most of the basic stuff from YouTube tutorials.
The problem I have current is when players selects character and spams the button it will create duplicate dialogs of the selection character and the duplicated when players move on. I have asked a few people but I could not get the hold of the person to help me finish it. I know that I have to put a critical section but don’t know where.
That is the trigger that I am having problem with written below. Any help would be great thanks.
Dialog;Class Selected
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
ClassSelected = 0 <Integer>
Conditions
DialogeConfirmSelection != (Used dialog item)
Actions
Variable - Set ClassSelected = (Dialog;FindClassSelected(, (Used dialog item)))
UI - Display (Text(ClassSelected)) for (All players) to Subtitle area
Dialog - Destroy Dialog;PreviousSelectedItem
Dialog - Destroy Dialog;PreviousSelectedDialog
General - Enter critical section using Dialog;MuTEX[(Picked player)]
Actions
General - Switch (Actions) depending on ClassSelected
Cases
General - If (0)
Actions
Dialog;ZoomtoClass((Triggering player), Point 001, 5.0, 35.0, 0.0, 2.0)
Dialog;Class Visual Rifleman()
General - If (1)
Actions
Dialog;ZoomtoClass((Triggering player), Point 002, 5.0, 35.0, -45.0, 2.0)
Dialog;Class Visual Medic()
General - If (2)
Actions
Dialog;Class Visual Gunner()
Dialog;ZoomtoClass((Triggering player), Point 003, 5.0, 35.0, -90.0, 2.0)
General - If (3)
Actions
Dialog;ZoomtoClass((Triggering player), Point 004, 5.0, 35.0, -125.0, 2.0)
Dialog;Class Visual Flamer()
General - If (4)
Actions
Dialog;ZoomtoClass((Triggering player), Point 005, 5.0, 35.0, -180.0, 2.0)
Dialog;Class Visual Recon()
General - If (5)
Actions
Dialog;ZoomtoClass((Triggering player), Point 006, 5.0, 35.0, -225.0, 2.0)
Dialog;Class Visual MM()
General - If (6)
Actions
Dialog;ZoomtoClass((Triggering player), Point 007, 5.0, 35.0, -270.0, 2.0)
Dialog;Class Visual CE()
General - If (7)
Actions
Dialog;ZoomtoClass((Triggering player), Point 008, 5.0, 35.0, -315.0, 2.0)
Dialog;Class Visual IUL()
Default
Variable - Set Dialog;PreviousSelectedDialog = (Last created dialog)
Variable - Set Dialog;PreviousSelectedItem = (Last created dialog item)
I am new to the galaxy editor and trying to finish this hero selection. I have learned most of the basic stuff from YouTube tutorials.
The problem I have current is when players selects character and spams the button it will create duplicate dialogs of the selection character and the duplicated when players move on. I have asked a few people but I could not get the hold of the person to help me finish it. I know that I have to put a critical section but don’t know where.
That is the trigger that I am having problem with written below. Any help would be great thanks.
Dialog;Class Selected
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
ClassSelected = 0 <Integer>
Conditions
DialogeConfirmSelection != (Used dialog item)
Actions
Variable - Set ClassSelected = (Dialog;FindClassSelected(, (Used dialog item)))
UI - Display (Text(ClassSelected)) for (All players) to Subtitle area
Dialog - Destroy Dialog;PreviousSelectedItem
Dialog - Destroy Dialog;PreviousSelectedDialog
General - Enter critical section using Dialog;MuTEX[(Picked player)]
Actions
General - Switch (Actions) depending on ClassSelected
Cases
General - If (0)
Actions
Dialog;ZoomtoClass((Triggering player), Point 001, 5.0, 35.0, 0.0, 2.0)
Dialog;Class Visual Rifleman()
General - If (1)
Actions
Dialog;ZoomtoClass((Triggering player), Point 002, 5.0, 35.0, -45.0, 2.0)
Dialog;Class Visual Medic()
General - If (2)
Actions
Dialog;Class Visual Gunner()
Dialog;ZoomtoClass((Triggering player), Point 003, 5.0, 35.0, -90.0, 2.0)
General - If (3)
Actions
Dialog;ZoomtoClass((Triggering player), Point 004, 5.0, 35.0, -125.0, 2.0)
Dialog;Class Visual Flamer()
General - If (4)
Actions
Dialog;ZoomtoClass((Triggering player), Point 005, 5.0, 35.0, -180.0, 2.0)
Dialog;Class Visual Recon()
General - If (5)
Actions
Dialog;ZoomtoClass((Triggering player), Point 006, 5.0, 35.0, -225.0, 2.0)
Dialog;Class Visual MM()
General - If (6)
Actions
Dialog;ZoomtoClass((Triggering player), Point 007, 5.0, 35.0, -270.0, 2.0)
Dialog;Class Visual CE()
General - If (7)
Actions
Dialog;ZoomtoClass((Triggering player), Point 008, 5.0, 35.0, -315.0, 2.0)
Dialog;Class Visual IUL()
Default
Variable - Set Dialog;PreviousSelectedDialog = (Last created dialog)
Variable - Set Dialog;PreviousSelectedItem = (Last created dialog item)