Dialog Array event

Iwan_Krissov

New Member
Reaction score
18
I was wondering if there is a better way to do this:
Code:
LangDialogChoose
    events
        Dialog - A dialog button is clicked for dialoge_language[2]
        Dialog - A dialog button is clicked for dialoge_language[3]
        Dialog - A dialog button is clicked for dialoge_language[4]
        Dialog - A dialog button is clicked for dialoge_language[5]
        Dialog - A dialog button is clicked for dialoge_language[6]
        ....
    conditions
        ....
    actions
        ....
The trigger shall be called whenever one of these dialog buttons is clicked, "dialoge_language[x] is an array, in which 2 buttons are set for each player...
 

LoveTD's

New Member
Reaction score
34
not sure if this works but you can give it a try: Dialog - A dialog button is clicked for dialoge_language[(Player number of (Player((1 + (2 + (3 + (4 + (5 + 6))))))))]

(I'm a bit lazy so I don't wanna try it right now :D)

Off-topic: whoopie 250 posts ^^

ow and if that doesn't work then try: A dialog button is clicked for dialoge_language (1 + (2 + (3 + (4 + (5 + 6))))) (think that would work better then the first one thought :p)
 

Iwan_Krissov

New Member
Reaction score
18
this works just like dialoge_language[21], thats not quite what I want ...

@ace:
yeah its the same dialog for all players...may you explain shortly?
 

LoveTD's

New Member
Reaction score
34
Hmm oops never thought of that ^^ sorry for being lazy :D
b.t.w. acehart is right maybe this works:
Code:
Events:
Dialog - A dialog button is clicked for dialoge_language
Conditions:
Actions:
If ((Triggering player) Equal to Player 1 (Red)) then do (-------- blablabla --------) else do (-------- blablabla --------)

hmm not sure if triggering player is ok :D
 

Iwan_Krissov

New Member
Reaction score
18
okay one dialog for all will do, I trust you on that^^

but for the dialog-buttons:
my dialog has, lets say 2 buttons.
If I want to check, which button a player has clicked, do I need only 2 variables as well or do I need 2 variables for each player?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
One variable for each button.
Or, better, some array that holds them all.


Then again, for two buttons only, one simple variable will do.

If (Clicked dialog button) equal to <variable>
then
...
else
... it was the other button
 

LoveTD's

New Member
Reaction score
34
2 variable's as well... If (((Triggering player) Equal to Player 1 (Red)) and ((Clicked dialog button) Equal to whatever_dialog_button_you_have[1])) then do (-------- blablabla --------) else do (-------- blablabla --------)

damn you are faster then me acehart :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top