Turn off Bounce off Solids via Event

0 favourites
  • 12 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Hello,

    I'm trying to turn off the "Bounce off Solids" parameter via an event. It's like it's missing that option. I can set everything else, like gravity, and speed, but not this option.

    Or maybe i'm missing it somewhere.

    Can you help?

  • You could try disabling the solid behavior on the solid objects.

  • You can also create two bullet behaviors on your sprite -- one with bounce enabled and one disabled as in the following capx.

    DoubleBullet.capx

    Left click to disable bounce, right click to enable. Try to reach the key.

  • You could try disabling the solid behavior on the solid objects.

    The object originally didn't have the "solid" behavior, it had the bullet behavior.

    So I added the solid behavior and at the right time fired off the action "Set Solid Disabled"

    But no luck, it still runs into solids.

    It's the bullet behavior and it's "Bounce off Solids" parameter.

    How do I turn that one off?

  • You can also create two bullet behaviors on your sprite -- one with bounce enabled and one disabled as in the following capx.

    DoubleBullet.capx

    Left click to disable bounce, right click to enable. Try to reach the key.

    The problem, is that I use the bullet behavior to move the object. It's a plane, so I want it to "Fly" over solid objects essentially.

  • Just click where it says "Yes", in the "Bounce off Solids" parameter and select "No".

  • Ashley was not suggesting adding solid behavior to your airplane sprite, but that you turn it off on the wall that the plane is colliding with if you don't want it to bounce at that time.

    In my example the ball goes through the walls when you left click (which turns off bounce off walls) only because the ball was placed in the layout before the walls. If you want it to go over the walls, just move the walls to the bottom of the z order. (Or you could put the ball on a layer above the wall layer.)

    I updated the project so that it has the walls at the bottom. The ball flies right over the walls when you left click, and bounces off the walls when you right click.

    Note that any changes you make to one bullet behavior you should make to the other bullet behavior. That is why I copied the angle of motion from one to the other when switching behaviors. That would also apply to speed.

  • Just click where it says "Yes", in the "Bounce off Solids" parameter and select "No".

    How do you do this as an action?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley was not suggesting adding solid behavior to your airplane sprite, but that you turn it off on the wall that the plane is colliding with if you don't want it to bounce at that time.

    In my example the ball goes through the walls when you left click (which turns off bounce off walls) only because the ball was placed in the layout before the walls. If you want it to go over the walls, just move the walls to the bottom of the z order. (Or you could put the ball on a layer above the wall layer.)

    I updated the project so that it has the walls at the bottom. The ball flies right over the walls when you left click, and bounces off the walls when you right click.

    Note that any changes you make to one bullet behavior you should make to the other bullet behavior. That is why I copied the angle of motion from one to the other when switching behaviors. That would also apply to speed.

    Both objects aren't bullets, and we can't allow other objects but the plane pass so this wouldn't work.

    The easiest solution is to adjust that parameter for the bullet behavior on the plane using the event sheet. You can adjust others, but not this one parameter unless I'm just missing it...

  • I don't think you are reading what I am saying or looking at the example I took the time to provide. In the example there is only one sprite with the bullet behavior. Let me repeat: There is only ONE(1) SPRITE with the bullet behavior!

    However, that single sprite object has TWO (2) bullet behaviors on it. I know it isn't as easy as the solution you WANT, but that doesn't exist. And even though this one sounds weird, it DOES work, and does not allow other objects to pass through the walls even temporarily.

    Here. Let me draw you a picture:

    <img src="https://dl.dropbox.com/u/57899112/DoubleBullet.png" border="0" />

    This is a perfect example of why you should post YOUR example so we can help you with YOUR specific case, rather than have to try to guess what you want and have you tell us we didn't guess right.

    EDIT: Sorry if I came off as a bit ticked. I don't mean to. If you still have questions, post a simple capx showing what you are trying to do. It will save everyone a lot of time.

  • hhhhhhhhhhh

    <img src="http://barefootfts.com/assets/images/userPics/1300211280_5641.jpg" border="0" />

  • Hooray!

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