How do I access loop index variable?

Get help using Construct 2

Post » Thu Jul 26, 2012 8:26 pm

Srsly, how do i subj?

I do something like
for "whatever" from 1 to 100
set a("whatever")."whatever"*x

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 ?
B
18
S
3
G
4
Posts: 46
Reputation: 3,873

Post » Thu Jul 26, 2012 8:32 pm

To get the current loop's index, input "loopindex". (witout quotes)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 11:01 pm

and loopindex("nameofloop") to get a specific running loops loopindex
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Aug 01, 2012 12:13 pm

Tnx, ill try it as soon as ill get back to home
B
18
S
3
G
4
Posts: 46
Reputation: 3,873

Post » Sat Feb 08, 2014 6:15 am

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...
B
4
Posts: 12
Reputation: 249

Post » Sat Feb 08, 2014 8:22 am

[QUOTE=aridale] and loopindex("nameofloop") to get a specific running loops loopindex[/QUOTE]


:o

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

Thanks :D



[QUOTE=mubilla] 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...[/QUOTE]


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


*searches for the roflcopter*
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,867


Return to How do I....?

Who is online

Users browsing this forum: currypuff, makotto, Yahoo [Bot] and 19 guests