How do I access loop index variable?

  • Srsly, how do i subj?

    I do something like

    <font face="Courier New, Courier, mono">for "whatever" from 1 to 100

    set a("whatever")."whatever"*x</font>

    and get nothing

    with or without quotes

    with local variable it make no sense at all

    with global one it always uses its initial value

    O.o ?

  • To get the current loop's index, input "loopindex". (witout quotes)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • and loopindex("nameofloop") to get a specific running loops loopindex

  • Tnx, ill try it as soon as ill get back to home

  • seriously scirra.

    this is not intuitive at all... loopindex("nameofloop")???

    what the hell is that.

    refering to a loop index should be much simplier than that...

    construct 2 simplifies a lot of things but overcomplicates other stuff...

  • and loopindex("nameofloop") to get a specific running loops loopindex

    :o

    Thanks for that, .. I been stuffing the loopindex in vars for subbed for each's.

    Thanks :D

    seriously scirra.

    this is not intuitive at all... loopindex("nameofloop")???

    what the hell is that.

    refering to a loop index should be much simplier than that...

    construct 2 simplifies a lot of things but overcomplicates other stuff...

    You smell like a construct 2 veteran who really knows what he's talking about ....

    *searches for the roflcopter*

  • I think

    loopindex("nameofloop")

    Is simple and is needed by C2.

    It prevents mix ups of other things.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)