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
80
S
22
G
95
Posts: 2,415
Reputation: 57,667

Post » Sun Feb 23, 2014 2:14 am

Or make Global and drag it to whatever sub-event to make it Local
B
160
S
69
G
44
Posts: 2,611
Reputation: 36,844


Return to How do I....?

Who is online

Users browsing this forum: kelany, ultrafop and 6 guests