Help with global variable

Get help using Construct 2

Post » Fri Jul 06, 2012 1:03 pm

Hey guys im doing this tutorial

But im confued when it says: First, I am declaring a new global variable called destroyed. Now, look at the events:

Event 1: on the start of the layout (think about ADDED_TO_STAGE if you love AS3) I am setting destroyed variable to zero and set the dynamic text to Destroyed: 0/6?.

What does it mean when he says :declaring a new global variable?

I know i can add a variable to a sprite and such but i dont think thats what that person ment here.

Im kinda new to construct 2 and confused by this anyone that can help me out?ganjaman712012-07-06 13:07:02
B
4
Posts: 4
Reputation: 333

Post » Fri Jul 06, 2012 1:14 pm

Variables in construct are declared when you make them, you have to put in an initial value. There's no need to "declare" it by setting it to a value on start of layout, unless you want the variable to reset whenever the layout starts. So as far as I know, he used the wrong term.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Jul 06, 2012 3:14 pm

Ok thanks for the info.
B
4
Posts: 4
Reputation: 333


Return to How do I....?

Who is online

Users browsing this forum: Rezzon71, tarek2 and 23 guests