Suggestion for Pin Behavior

For developers using the Construct 2 Javascript SDK

Post » Fri Feb 15, 2013 1:32 am

Hi Ashley,

I think it would be valuable to add a "Pinned to UID" condition for Pinned objects, so that you can easily pick all objects which are pinned to a specific object.

I may have originally posted this in the wrong forum, which is why I'm posting here. The original topic is at the link below, and includes the code required to make the change (as of v1.14 I believe):

http://www.scirra.com/forum/suggestion-pinned-to-uid-condition_topic63232.html
B
6
Posts: 26
Reputation: 577

Post » Fri Feb 15, 2013 12:46 pm

You can do this as an expression: Sprite.Pin.PinnedUID

It returns the UID of the object pinned to when pinned, or -1 when not pinned.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Fri Feb 15, 2013 10:10 pm

I understand that this expression exists, but that means in this case that I'll have to use a For each and compare two variables. It would be nicer to just have a condition for "Pinned to UID".

Here's an example situation where it would help:

https://dl.dropbox.com/u/117529592/Construct%202/Forum%20questions/PinnedToUIDExample.capx
B
6
Posts: 26
Reputation: 577


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests