Hello Joakim,

there are hundred ways to optimize your java code for sure, but if it works, 
just leave it that way :-)

you get two outputs if you simple add a [2] to the output variable in the 
function-definition:

function (__number outputNumber[2]) main ….

But I would suggest that you use input names thats tell the story. You can have 
multiple inputs with different names. Also I would change __number to __index 
since number is a float and can have glitches in your specific code.

function(__index playerOne, __index playerTwo) main (__index kind, __index 
state …__index value7)

what ever names fits you needs.

best,

Achim Breidenbach
Boinx Software

On 19.01.2012, at 21:14, Joakim Svensson wrote:

> I've have a short patience so I wrote this crappy pice of Java-script to 
> solve the problem, then used "String Subrange" to extract the right number to 
> the right "Structure Index Member":
> 
> Is it impossible to have multiple outputNumber?
> 
> function (__number outputNumber) main (__number inputNumber[7])
> {
>       var result = new Object();
>       if (inputNumber[6] == 1) {
>               if (inputNumber[0] == 2) {
>               result.outputNumber = 0 
>               } else if (inputNumber[1] == 2) {
>               result.outputNumber = 1         
>               } else if (inputNumber[2] == 2) {
>               result.outputNumber = 2 
>               } else if (inputNumber[3] == 2) {
>               result.outputNumber = 3         
>               } else if (inputNumber[4] == 2) {
>               result.outputNumber = 4         
>               } else if (inputNumber[5] == 2) {
>               result.outputNumber = 5         
>               }
> } else if (inputNumber[6] == 2) {
>               if (inputNumber[0] == 2 && inputNumber[1] == 2) {
>               result.outputNumber = 01
>               } else if (inputNumber[0] == 2 && inputNumber[2] == 2) {
>               result.outputNumber = 02
>               } else if (inputNumber[0] == 2 && inputNumber[3] == 2) {
>               result.outputNumber = 03
>               } else if (inputNumber[0] == 2 && inputNumber[4] == 2) {
>               result.outputNumber = 04
>               } else if (inputNumber[0] == 2 && inputNumber[5] == 2) {
>               result.outputNumber = 05
>               } else if (inputNumber[1] == 2 && inputNumber[2] == 2) {
>               result.outputNumber = 12
>               } else if (inputNumber[1] == 2 && inputNumber[3] == 2) {
>               result.outputNumber = 13
>               } else if (inputNumber[1] == 2 && inputNumber[4] == 2) {
>               result.outputNumber = 14
>               } else if (inputNumber[1] == 2 && inputNumber[5] == 2) {
>               result.outputNumber = 15
>               } else if (inputNumber[2] == 2 && inputNumber[3] == 2) {
>               result.outputNumber = 23
>               } else if (inputNumber[2] == 2 && inputNumber[4] == 2) {
>               result.outputNumber = 24 
>               } else if (inputNumber[2] == 2 && inputNumber[5] == 2) {
>               result.outputNumber = 25
>               } else if (inputNumber[3] == 2 && inputNumber[4] == 2) {
>               result.outputNumber = 34
>               } else if (inputNumber[3] == 2 && inputNumber[5] == 2) {
>               result.outputNumber = 35
>               }
> }
> return result;
> }
> 
> 
> 
> 19 jan 2012 kl. 20:16 skrev Joakim Svensson:
> 
>> I'm almost finished my game where two players compete in swimming (on 
>> ground) using Osceleton using the Tryplex toolkit.
>> 
>> Osceleton gives new players an ID from 1 - 6 by changing the player value 
>> from 0 to 2. Since my game is two player and the ID ranges up to six I have 
>> problem. Is there a way to automatically assign my virtual player an ID 
>> (done by changing a "Structure Index Member" to the ID's value -1)? Since 
>> theres a lot of possible combinations I can't figure out how to do this.
>> 
>> Thanks in advance,
>> Joakim Svensson _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Quartzcomposer-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/quartzcomposer-dev/joakim%40imponera.se
>> 
>> This email sent to [email protected]
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to