Issues with pinning multiple instances

0 favourites
  • 3 posts
From the Asset Store
Pin UI
$3.50 USD
Create a perfectly Pinned Interface for Any Device
  • I've tried every way to find an answer for this, but I guess I just don't know the right terminology.

    I'm trying to create multiple enemies on screen with a bullet movement. Each will travel X distance, then rotate 90 degrees, and repeat.

    To do this, I have an invisible sprite "Enemy_Box" with Bullet behavior to handle the movement, and I'm pinning Enemy_Sprite to it so that I can control the animation.

    I can get everything to work fine so long as I only have 1 instance of Enemy_Box and one instance of Enemy_Sprite. But for the life of me I can't figure out how to make the system work if I have more instances of each on the screen. The pinning goes crazy, the movement goes crazy... I have no idea how to designate which pins to which. If I add a "name" instance variable, I can't find any way to access that with the Pin command.

    Am I going about this entirely wrong??? I could make a separate Enemy_Box1, Enemy_Box2, etc. sprite for every enemy, but that seems crazy redundant... that can't possibly be the only way.

  • If you put the sprite and box in a 'container', whenever you create the box it will create a sprite with it, then they know and relate to each other. Instead of container you can use other methods like sprite is overlapping box then pin.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OMG that was it! I tried the container already, but I mistakenly added extra enemy sprites as well and it went haywire... I didn't realize the container would AUTOMATICALLY create the sprite when I placed a new Box! Thanks so much!

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