How to pin multiple instances of SPRITE A onto multiple instances of SPRITE B

0 favourites
  • 4 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 have multiple instances of an "ENEMY" and multiple instances of "FLASHLIGHTS" on the same layout. I have placed a FLASHLIGHT on top of each ENEMY. The FLASHLIGHT sprite has the PIN behavior. I would like for all FLASHLIGHTS to pin to the ENEMY on which they are positioned over on the LAYOUT at the START OF THE LAYOUT.

    If I have a ON START OF THE LAYOUT -> PIN FLASHLIGHT to ENEMY, all of the instances of the FLASHLIGHT pin onto ONE of the ENEMIES. What would the event be so that all of the flashlights pin to the corresponding ENEMIES based on their position on the layout? I know that it may be related to PICK INSTANCES condition, but don't know how to do it. Thank you in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know if this would be 100% working, but you could try

    FLASHLIGHT > Is Pinned (Inverted to make Is Not Pinned) & Overlapping ENEMY > Pin FLASHLIGHT to ENEMY.

    Since it is only picking the instance it is touching, this should work, UNLESS one flashlight is overlapping multiple enemies.

  • Add the flashlight to the enemy as a container. This will create a flashlight for the enemy without the need for events, when an enemy is created.

    Then you can add 2 conditions:

    Enemy - on created

    Loop - for each enemy > Pin flashlight to image point

    Apologies for phone screen shots, but you get the gist

  • Oh yeah I forgot about containers.

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