HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trick with dialogs.

08-24-2002, 09:05 PM#1
weaaddar
For us old fashion guys who don't use engines to make dailogs (real men), you know as well as I do that dialog arrays don't work in events thats a problem right, wrong!
Now most of us define the dialog varaibles to our dailog array for ease use now heres what you have to do cutyour event from your response trigger, and paste it after binding it to the dialog array. Now cuz I'm lazy (and so are you) create 4 local dialog varaibles which are named what your dialogs are called minus the udg_ . Now remove the udg_ part from defining the dialogs to dialog arrays, and from the event Now your code should look something like this.
Code:
    local dialog  d_Player_1 = DialogCreate()
    local dialog  d_Player_2 = DialogCreate()
    local dialog  d_Player_3 = DialogCreate()
    local dialog  d_Player_4 = DialogCreate()
    set udg_d_Player[1] = d_Player_1
    set udg_d_Player[2] = d_Player_2
    set udg_d_Player[3] = d_Player_3
    set udg_d_Player[4] = d_Player_4 
    call TriggerRegisterDialogEventBJ( gg_trg_Response, d_Player_1 )
    call TriggerRegisterDialogEventBJ( gg_trg_Response, d_Player_2 )
    call TriggerRegisterDialogEventBJ( gg_trg_Response, d_Player_3 )
    call TriggerRegisterDialogEventBJ( gg_trg_Response, d_Player_4 )

Now go ahead delete your udg_d_Player_1 2 3 4, It'll give you an error about them being still in use but don't worry the compiler is just dumb.