How to put an image (sprite) with some solid parts?

0 favourites
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • I would like to know how I can put part of an image (sprite) as solid.

    Depending on the image of a basketball hoop, I would like the bows to be solid so the ball can hit and fall into the basket.

    The parts in green, I want to put as solid.

  • You can create a separate object to cover the green area and make it solid, will that work?

  • Hi, thanks for the reply.

    It would work, but how would I bind a solid object to this sprite?

  • If it's a basketball net it shouldn't move right? :P You can use the pin behaviour to pin it to the basketball net sprite. If you are using the object purely to detect a ball hitting it then I don't think it will matter too much.

  • The game I am developing is a ball that has the platform function and will have this basket.

    There will be obstacles to reach that basket.

    In this way, I wanted to solidify the two ends of the basket so that the ball can climb into the basket and pass through it, so if the ball goes through the basket the player earns a point.

    As you mentioned and forgot to mention, I need to detect the ball going through the basket, I would normally create an object and if I went into a collision it would gain a point, but I do not know how to do that either.

    You talked about pins, where do I see this function?

    Thank you very much!!!

  • Thanks for explaining the game a bit more, so you just need to create a solid object to go where the green is displayed. It doesn't do anything it's just a solid sprite that you position there. For the score you can create an invisible object that stretches across between the two solid sprites and say ball on collision with object, add 1 to score variable. This will mean when the ball collides with it and drops into the basket you gain +1 score.

  • Hello.

    Thanks for the information, I understood the basket score process, but I have not yet understood the process of creating a solid sprite (basket bow) and join with the basket sprite.

    As mentioned, I saw that there is the 'pin' behaviors, I have already inserted both the bow and the basket, and went on my event sheet and put bow -> Pin is pinned / pin to basket (mode position).

    Is that all?

    Thank you very much.

  • Well they don't need to relate to the basket sprite if they are just used as collision detectors for the ball. If the basket doesn't move then you just position then on either side of the basket where the green area is and set them to solid. Pin is not really required unless the basket moves so the collision objects move with it.

  • I would need the basket to move.

    I think the pin will solve.

  • Oh if the basket moves about then you can pin the solid objects to the basket, all good.

  • Many thanks plinkie, I managed to do, but it turned out that generated another problem, sometimes it can help me.

    This basket I want it to be created every 10 seconds for example, but when I create the object, it takes the original object that is the basket without the bow for example.

    Do you know how I could create the object with the pin?

    thank you very much.

  • Try creating 2 imagepoints on the basket where you will position the green bits. Then you can do an event : on basket created > spawn green bit at imagepoint 1 and spawn green bit at imagepoint 2.

  • plinkie, thank you !!!

    Solved my problem.

    Thank you for contributing your knowledge!

    Strong hug and thank you again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can put them in a container, then when creating the object all related objects in the container will also be created.

  • Hello, Headbang Games.

    I did not know this function, thanks for sharing, I'll test it.

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