Applying an Impulse from one Sprite to another

0 favourites
  • 5 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • Hi all,

    I'm extremely new to Construct 2 and could do with a little help.

    I'm trying to create a simple football (soccer) game with a top down view. I have the player sprite working correctly and have also succeeded in creating a ball sprite that the player can push around the screen.

    So far so good.

    However I would like the player to be able to kick the ball in whatever direction they are currently facing whenever I press the "s" key.

    At the moment the kicking function is irregular and does not go in the direction required.

    This is what I'm trying to achieve:

    <img src="http://img547.imageshack.us/img547/7481/help1l.png" border="0" />

    Here is my capx file:

    mediafire.com

    Any help would be greatly appreciated.

    Cheers.

  • Please help!

    Anyone with any thoughts on this?

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I am a newbie myself.. but here's how i would try to do it.

    umm use physics on both of the colliding objects and play around with density and elasticity. Also try adding something like this maybe ?

    on collision -> apply physics impulse (1) at angle (object.angle) at image point (0)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try this: create new image point for TeamA object at x-15, y-0, in every action of player control change image point to newly created, turn off "Prevent rotation" property at physics settings of your player, change Angular damping to 3, and then set angle of impulse to teamA.Angle-90

    here's an exemple - dropbox.com/s/3qjoyv66pmegb2w/Football2.capx

  • Thanks you the replies guys, and thanks GT88 for the capx.

    After much trial and error I managed to crack it myself last night.

    Thanks again though. :)

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