hi, is it possible to refer to the index of an array ?
i have a variable with an array from 1-5. there is my event wich fires when any of these array triggers. can i set another integer variable to 3, if the event is triggered from the variable [3] ?
of a variable. I want it with dialogs. i have 5 buttons button[1], button [2], and so on. if button [3] is clicked, can i set a variable to 3 ? i mean without "if button [1] is clicked set variable = 1, if button [2] is clicked...
in short: set variable (integer) = index of button[x]
The problem with what you want is that it's upside-down. What you can do is make a for loop, which checks for each int from 1 to 5 if button[x]=Used dialog item. If yes, set the variable to be the integer.
nope. Because in your example 'set variable (int) = index of button[x]',
To define the button, whose index you would like to know, you would again have to declare the button by its own index there, by hand. So in the long run, manually doing it is easier anyways.
hi, is it possible to refer to the index of an array ? i have a variable with an array from 1-5. there is my event wich fires when any of these array triggers. can i set another integer variable to 3, if the event is triggered from the variable [3] ?
@PsychoMC: Go
Array of what?
of a variable. I want it with dialogs. i have 5 buttons button[1], button [2], and so on. if button [3] is clicked, can i set a variable to 3 ? i mean without "if button [1] is clicked set variable = 1, if button [2] is clicked...
in short: set variable (integer) = index of button[x]
@PsychoMC: Go
The problem with what you want is that it's upside-down. What you can do is make a for loop, which checks for each int from 1 to 5 if button[x]=Used dialog item. If yes, set the variable to be the integer.
@PsychoMC: Go
nope. Because in your example 'set variable (int) = index of button[x]',
To define the button, whose index you would like to know, you would again have to declare the button by its own index there, by hand. So in the long run, manually doing it is easier anyways.
ah ok thank u. i did it manually which was a lot of work , but at least i could reduce a lot of copy-change-value work with local variables...