How do I Work with local number

Get help using Construct 2

Post » Tue May 13, 2014 4:06 pm

I'm setting a value to a local number, but it keeps returning the initial value right after I set the new value, like less then 1 sec it changes.
I had to use global number in order to do what I want, but it can't be normal. Since I've worked with local numbers before and this not happened.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Tue May 13, 2014 4:14 pm

From the manual :
By default, local variables reset to their initial value whenever entering their scope (usually every tick), like local variables in programming languages. If the variable is marked static in the Event Variable dialog it will persist its value permanently, like a global variable.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Tue May 13, 2014 5:01 pm

granpa wrote:From the manual :
By default, local variables reset to their initial value whenever entering their scope (usually every tick), like local variables in programming languages. If the variable is marked static in the Event Variable dialog it will persist its value permanently, like a global variable.


Well, I've used local numbers before and it did not happen and wasn't marked static too. That's wierd.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Yahoo [Bot] and 23 guests