FlyingPenguin's Recent Forum Activity

  • It works! I think I tried the For Each before, but I guess I didn't format it right. Thank you so much for the help, I'll leave a screenshot of the event here in case anyone needs it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's what I did, sorry if my explanation was confusing. The problem with that code is that when you "pin" multiple enemies, every arrow after the first one gets "pinned" to the first enemy hit.

    So let's say there are 2 enemies, enemy A and enemy B. If I shot enemy A and then shot enemy B, the first arrow would pin correctly to A, but every arrow after that, even the ones shot at B, would still pin to A.

  • Why do you need UIDs here? This should be enough:

    Arrow on collision with Enemy -> Arrow pin to Enemy.

    I want to pin the arrows to an image point, so I'm using the UIDs to make a custom pinning action that runs every tick. The UIDs are for the instance variables on the arrows, so I know what enemy they're pinned to.

  • So in my game, you shoot arrows at enemies and I want the arrows to stay pinned inside them. I've been trying to make a sort of custom pinning function so I can pin the arrows to certain enemies' image points, but it hasn't been working.

    My method is whenever an arrow collides with an enemy, it stores the UID inside of an instance variable and then having an event "pin" the arrow and enemy's image point after. This works if there is only one enemy pinned, but it multiples I've been finding that all of the arrows stick to the first enemy that got pinned. I suspect it's because the action is only picking the first enemy with a UID that matches the arrow's instance variable.

    So is there any way that I could set the position to an object's image point based on the UID as an action? I don't know any javascript, but maybe it would be possible using that?

    Tagged:

FlyingPenguin's avatar

FlyingPenguin

Member since 14 Feb, 2019

Twitter
FlyingPenguin has 1 followers

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies