Just a question that's been bothering me ever sinc

Discussion and feedback on Construct 2

Post » Wed Jun 27, 2012 10:57 am

1) The question I wanted to ask is, what's the difference between "PIN" and "System > set position" ?

I've never used the PIN behaviour, I've been using System > set position all this time.

2) Also another question, I thought in the official tutorial for beginners it said we can only create one global variable but yet I've made 3.cmr3332012-06-27 11:01:43
B
9
G
1
Posts: 41
Reputation: 1,259

Post » Wed Jun 27, 2012 11:02 am

Pin is just a convenience behavior. The 'Scroll to' behavior simulates 'Every tick - scroll to object.x, object.y', and the Pin behavior simulates placing it at a relative position every tick. The Pin behavior can also still position relatively taking in to account the object scale and angle changing, which involves a bit of trigonometric math, so it's nice it takes care of that for you too.

Recent builds have added more features to pin, like rope or bar style attachment.

As for 2) can you quote where you thought it said this? It's certainly not true, so I don't know why I'd write that in the tutorial :)Ashley2012-06-27 11:03:04
Scirra Founder
B
357
S
214
G
72
Posts: 22,945
Reputation: 178,206

Post » Wed Jun 27, 2012 2:09 pm

@Ashley
It's on page 6 of the monster ghost game tutorial

"Instead, we can use a global variable. Like an instance variable, a global variable (or just "global") can store text or a number. However, there's only ever one value stored"

"However, there's only ever one value stored"
B
9
G
1
Posts: 41
Reputation: 1,259

Post » Wed Jun 27, 2012 2:22 pm

Yes, it means there is one value per global variable, in opposition to an array that can hold multiple values in a single instance for example.

But it isn't a restriction on the number of global variables that you can have in a project.
Kyatric2012-06-27 14:23:18
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Post » Wed Jun 27, 2012 3:15 pm

I edited the tutorial to clarify what I meant. You are definitely allowed multiple global variables though - only allowing one would be a ridiculous limitation! Is this clearer now?:

[quote]Like an instance variable, a global variable (or just "global") can store text or a number. Each variable can store a single number or a single piece of text. Global variables are also available to the entire game across all layouts - convenient if we were to add other levels.[/quote]
Scirra Founder
B
357
S
214
G
72
Posts: 22,945
Reputation: 178,206

Post » Wed Jun 27, 2012 3:57 pm

@Kyatric lmao you just helped my brain to put the missing pieces of my knowledge of Array's by accident :P
B
9
G
1
Posts: 41
Reputation: 1,259

Post » Wed Jun 27, 2012 4:19 pm

Glad I helped
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786


Return to Construct 2 General

Who is online

Users browsing this forum: gamecorpstudio, Zonacas and 14 guests