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
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Sun Feb 23, 2014 2:14 am

Or make Global and drag it to whatever sub-event to make it Local
B
157
S
66
G
41
Posts: 2,598
Reputation: 34,823


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne, Yahoo [Bot] and 16 guests