Noob Question

Get help using Construct 2

Post » Thu Nov 08, 2012 10:28 pm

I know this is probably a stupid question but for the life of me I cannot figure out how to create a local variable. Every time I try it brings up a global variable it never gives me the option to create a local variable.
Please Help.
B
3
Posts: 4
Reputation: 283

Post » Thu Nov 08, 2012 10:33 pm

Click the sprite you want to add a variable to, and then on the left hand side you'll see a list, in there it says "instance variables" click Add/edit and a new window will pop up. Press the + button in there to create a new variable for that object.
B
63
S
26
G
9
Posts: 866
Reputation: 11,708

Post » Thu Nov 08, 2012 11:31 pm

Yes but i was wondering how do you create a local variable in the event sheet like you would create a global variable in the event sheet.
B
3
Posts: 4
Reputation: 283

Post » Fri Nov 09, 2012 12:11 am

Local variables don't show up at the top of event sheets like global variables.
B
44
S
13
G
7
Posts: 603
Reputation: 7,936

Post » Fri Nov 09, 2012 1:39 am

Yes but there is a way you can create local variables like you create global variables. I am not talking about instance variables. If you click on the event tab and then put your mouse pointer over add variable it says add local or global variable but when I click on it I only get global. I downloaded Kyatric's capx for Asteroids to practice because I am new to this software and he uses a lot of local variables that I can't find how to create.
B
3
Posts: 4
Reputation: 283

Post » Fri Nov 09, 2012 1:45 am

Nevermind I finally figured it out thanks for all the help though guys!!
:)
B
3
Posts: 4
Reputation: 283

Post » Tue Nov 13, 2012 9:21 pm

I had trouble with this too at first so I'll post a reply for others.

The trick here is to right click in the Event Margin and select it from the "Add" sub-menu.
B
12
S
4
G
2
Posts: 59
Reputation: 3,769

Post » Tue Nov 13, 2012 10:27 pm

Don't use local variables , their value change to zero every ticks !
B
36
S
16
G
16
Posts: 2,223
Reputation: 16,646


Return to How do I....?

Who is online

Users browsing this forum: alajajm, Draconiz717, Fenix18, GlassCanon1993, jakeedge02 and 9 guests