How do I make a local number?

Get help using Construct 2

Post » Thu Jan 22, 2015 5:43 pm

Hi there,

I've come across this twice in recent exploration in the use of arrays (still don't get it fully for what I need but I feel optimistic). https://www.scirra.com/tutorials/307/ar ... ers/page-1 is a big help.

However, in some of the examples i've seen, I see "local number" variables appear in event sheets and I don't get either how they are made or how they matter.

I know global variables and i know about instance variables. How do I create a local number and what is it that makes the special or necessary?


Thanks,
Caleb
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Thu Jan 22, 2015 5:48 pm

Local variables can be placed only on subevents. As a quick test - take an event, press B to place a subevent, then press V to add a local variable. Voila!
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Jan 22, 2015 5:56 pm

Ok I do see now that a local number is a global number that gets drug down into sub areas.. but still to the question how important is this vs keeping it global? its it just a thing to help keep things compartmentalized? Perhaps to avoid the variable to show up everywhere else in the game event sheets and such?
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Thu Jan 22, 2015 5:57 pm

Also @somebody i like the B to make blank sub events.. very handy! :) I didn't know about that shortcut.
B
59
S
9
G
1
Posts: 942
Reputation: 6,553


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests