Local variables in function

Get help using Construct 2

Post » Fri Feb 21, 2014 6:34 pm

How do I add local variable to function?

In my function I will need a counter. If I add parametr0 = 0 as number(function variable) I can't increment it. I figured I can store my "local variables" in array but it looks stupid. Is there a better way?
B
4
Posts: 17
Reputation: 232

Post » Fri Feb 21, 2014 7:57 pm

Right click..add local variable..
or just press V when function is selected
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Sun Feb 23, 2014 1:57 am

I want LOCAL not global!
B
4
Posts: 17
Reputation: 232

Post » Sun Feb 23, 2014 2:10 am

Right click on a sub-condition and add local variable. You can't add them to a top level condition - that would make them a global variable...
B
76
S
20
G
76
Posts: 2,285
Reputation: 47,554

Post » Sun Feb 23, 2014 2:14 am

Or make Global and drag it to whatever sub-event to make it Local
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests