How do you pin a sprite

0 favourites
  • 6 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • I use the event set position to object and have the sprite on the other sprite. But the sprite isn,t on the position i choose when i preview the layout. How do you make the sprite be on the position i choose

  • If you're using the standard C2 pin, then the offset position is relative to their initial starting positions in the layout.

    Personally I prefer using Rex's pin behaviour: c2rexplugins.weebly.com/rex_pinoffsetxy.html

  • I didn,t ask my question rigth. If i use the pin to object event and the sprite is on another sprite i pin to. When i preview the layout the sprite isn,t on the another sprites position. How do you create a written action so you can use Rexs pin behavior.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I still not sure I understand your question. You need to set the correct position of the sprite first, and then pin it to another object.

    If this doesn't work correctly and the sprite is misplaced, check Origin image points of both objects.

  • Hey buddy, as dop2000 mentioned the question is not clear but here are soem pin behavior tips which might help:

    - you could also put the object into a container of the parent so they are connected

    - you could say at the START OF LAYOUT set position of your PIN object at the coordinates of the parent and only AFTER that tell it to PIN to the object. You can do this not as a value but using the name of the object such as PARENT.X and PARENT.Y

    - if you have a layer order problem when you mentioned about visibility you may need to adjust the Z order as well so AFTER pinning you could add another directive to change the Z order such as moving it to the top of the layer

    Hope that helps,

    COSMOS

  • You set position and then pin it at start of layout, that is fine. But you have to add a condition, or maybe 2 conditions to be sure those object are picked in case that are more than one instances in the layout; so you could "pick by UID".

    Somethng like:

    At start of layout

    Sprite1 Pick instance with UID 2 --> Sprite1 set position to Sprite2

    Sprite2 Pick instance with UID 4 ... Sprite1 pin to Sprite2

    I hope it helps.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)