Speedy1SonicBoy's Recent Forum Activity

  • Alternatively, if you want to do this with image points, you will have to loop through all image points, check which ones are unoccupied, and which one is the nearest to Sprite1 - the code for this will be pretty complicated.

    Based on my example off of what you said, I think the latter may be the best and more thorough option. I think it gives room for the second part to this as well, which you already gave me the idea on how to solve for with the former example.

    In any case, I must have done something wrong, because some weirdness is going on where the other instances aren't occupying any other anchors.

  • > Yes, your event may look something like this:

    >

    >

    >

    >

    > Origin image point has index 0. Image points 1-4 are for attaching instances of Sprite2.

    Nice!

    First point seems to work. But now having done this in an example project, all instances of Sprite 2 seem to point to the same point.

    Not what I was hoping for... Proximity to the points was the thing I was hoping to attract Sprite 2 to Sprite 1, so that by proxy each one would attach to each point. Could it be because I have all my versions of Sprite 2 in the same family and am referencing the family instead? Or is there something more?

    Maybe I'm complicating things a little lol

    My idea was to have an instance of Sprite 2 attach to whichever of the 4 points Sprite 1 has nearest it without the other instances of Sprite 2 taking its place. Mind you, I also have the instances of Sprite 2 in a family, and I think I made it harder for myself in doing that, but I'm yet not sure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, your event may look something like this:

    Origin image point has index 0. Image points 1-4 are for attaching instances of Sprite2.

    Nice!

    First point seems to work. But now having done this in an example project, all instances of Sprite 2 seem to point to the same point.

    Not what I was hoping for... Proximity to the points was the thing I was hoping to attract Sprite 2 to Sprite 1, so that by proxy each one would attach to each point. Could it be because I have all my versions of Sprite 2 in the same family and am referencing the family instead? Or is there something more?

  • There are a few options:

    1. Create an instance variable - AttachmentPoint=1. Use it to identify which image point to attach Sprite2 to, and increment it by +1

    2. If attaching with hierarchy you can simply check the number of children on the parent sprite.

    3. You can loop through all 4 image points and check if any of them is not overlapping Sprite2. Use "System Is overlapping point" condition.

    Right, I should have said this before: I've just started dabbling in Construct, but I think Number 1 seems simple... I feel like I might be missing some context: how do you identify the points with an instance variable? Is that where the Event Sheet comes into play?

  • So I have a player sprite that has four additional points as well of the origin point. I want it to collect the other sprites in any of the four points (but not the origin) while also not having them overlap once that point has been taken. Any tips? Would be greatly appreciated!

  • For a family of sprites I want them all to follow what is essentially a quadrifolium path (some nestled also within another quadrifolium path, tilted 45deg)

    Coming from a beginner in Construct, trying to figure out how to apply the math has been a massive headache for me. Any suggestions would be highly appreciated!

    Tagged:

Speedy1SonicBoy's avatar

Speedy1SonicBoy

Member since 28 Sep, 2024

None one is following Speedy1SonicBoy yet!

Trophy Case

  • RTFM Read the fabulous manual
  • Email Verified

Progress

2/44
How to earn trophies