Forum Replies Created

  • Lars Koerkemeier

    February 19, 2009 at 1:43 am in reply to: Simple text expression

    Hey Dan
    Quick question. How would I go about adding more expressions to the final expression so instead of only using only 2 I can use like 8 different ones
    Thanks again
    -Lars

  • Lars Koerkemeier

    February 19, 2009 at 1:04 am in reply to: Simple text expression

    Hey Dan,
    That works great! Thank you so much
    -Lars

  • Lars Koerkemeier

    February 19, 2009 at 12:38 am in reply to: Simple text expression

    Hey Dan,
    Im getting an Error “Timeout while waiting for the engine” which if im right means its an infinate loop This is my current code:

    words = [“Hi”,”Bye”,”Dog”,”Cat”,”House”];
    seedRandom(index,true);
    idx = Math.floor(random(words.length));
    str = “”;
    for (i = 1; i <= 10; i++){ str += words[idx] + " "; idx = (idx + Math.floor(random(words.length-1)) + 1)%words.length; } str seedRandom(index, 1) stat = ""; for (i=0; i<10; i++){ r = (Math.floor(random(0, 100)*10)) + " "; stat = "YDS " + r + stat + " "; } s = ""; for (i = 1; 1 <= 2; i++){ if (random() < .5){ <-------Error s += str; }else{ s += stat; } s += "r"; } The error is on line 20 Thanks again for helping out -Lars

  • Lars Koerkemeier

    February 18, 2009 at 10:33 pm in reply to: Simple text expression

    Hey Dan,
    Thats exactly what I wanted! Now the only thing i need to do is pretty much make the expression you made plus a couple of the ones i already had and make on expression that takes those display in rows for about 100 rows randomly.
    EX:
    Hi Bye Dog Cat House Bye Cat Hi Dog House etc..
    125 332 221 548 456 684 489 655 156 221 118 etc…
    546 784 125 432 156 585 477 513 456 546 987 etc…
    Bye Dog Hi House Cat Dog House Bye Hi etc…

    Is there a way to give like just part of an expression a name so for example:

    A=
    words = [“Hi”,”Bye”,”Dog”,”Cat”,”House”];
    seedRandom(index,true);
    idx = Math.floor(random(words.length));
    str = “”;
    for (i = 1; i <= 100; i++){ str += words[idx] + " "; idx = (idx + Math.floor(random(words.length-1)) + 1)%words.length; } str B= list = 10; seedRandom(index, 1) stat = ""; for (i=0; i

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy