HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dialog Problems

11-26-2002, 04:33 AM#1
DKSlayer
I have a problem with my dialog. I am using a dialog array, and I define it using this.
Code:
set udg_CD[GetPlayerId(GetTriggerPlayer())] = DialogCreate()
That is write before I start adding buttons.
It displays and everything yippie.
Now I have a Trigger for detecting when a button is clicked it uses this event code.
Code:
call TriggerRegisterDialogEventBJ( gg_trg_Dialog, udg_CD[0] )
When I press a button on the dialog it goes away. But it does not run that one trigger. I can't figure it out. My only though is that it's because it has to do with the defining of the dialog or something.
Any help would be appreciated.
Thanks
DKSlayer
11-26-2002, 01:47 PM#2
SuperIKI
TriggerRegisterDialogEventBJ must be called right after the construction of the dialog. Not in the trigger that shall be called when the dialog is clicked.
1. Create a dialog
2. Add Buttons
3. Register its event
The trigger that is called does not need to know that it is called from a clicked dialog button event.
If this doesn't help, post the whole trigger, please.
11-27-2002, 11:30 PM#3
DKSlayer
Thanks I see that problem. I changing how I am going to do this plus then I will only have still One Trigger for the Commander.
Thanks Again for your help.
DKSlayer