Most value evaluating conditions pair up with expressions.
There is the condition Sprite > Compare X and its pairing expression Sprite.X.
So, u can use Sprite > Compare X .. or System > Compare two values (using Sprite.X).
The first one will filter the picklist (SOL), de second one will not filter the picklist.
There is a reason why i started like this.
Because in the same logic ....
You have the condition System > Pick nth Instance and its pairing expression sprite(nth).xxxxx
'nth' is in fact the IID for an instance of an object in a certain picklist (SOL), it is a zero based index, and it is a number.
If you have all instances of an object picked, this IID represents also the order that they are created.
And now some more background info.
Some conditions (but also expressions) have only a meaning when used with a certain condition.
The condition 'pick nth instance' has no meaning without a condition that actual picks items (make a SOL), so sprite(nth).xxxxx has no meaning without a pick.
The expresssion loopindex("i") has not meaning without a loop condition.
The expression array.curX has no meaning without a 'for each element' condition.
So, for you to adress an nth instance by instance(nth).xxxx, you should use a 'pick all' (althaught for only 1 line of code as in your example this is redunctant).
Then using the expression goes like this ...
"Email: " & input(0).Text & " / Password: " & input(1).Text
Beeing 0 the IDD of the first instance of the sprite input, 1 the IDD of the second sprite input.
You can use logical expressions. Like :
input.InputType = "Email" ? 1 : 0
But it is a bit weird to use this to return an IID.
Hi 99Instances2Go
Thank you very much for your detailed respone.
I know that I easily can get it via it's IID. But the game generates input fields depending on the current form (register or login). So I wanted to pick the corresponding input field depending on its instance variable.
So I thought I could pick an instance by the value of an instance variable of it.
Now I altered my code to this.
"Email: " & input(input.InputType = "Email" ? input.IID : -1).Text & " / Password: " & input(input.InputType = "Password" ? input.IID : -1).Text[/code:pzbwid6f]
This worked out for me Thank you for your help!
Regards
Andy