Platformer - Shoot Arrow.

0 favourites
  • 14 posts
From the Asset Store
Rain of Arrows
$1.60 USD
60% off
Full game Construct 2 and Construct 3 to post on Google Play
  • I'm new to Construct2 - i have some programming knowledge from AutoIt..

    I want to create a Platform Game, 3 Character Types. But i will ask other questions in the progress.

    What i couldn't find was a Tutorial to make a Bow-and-Arrow type of function.

    What i want to do:

    Left Mousekey down - Bow pull animation, the further you pull back the stronger you will shoot the arrow.

    When the LeftMouseButton is pressed i want to make a Circle to appear arround the spot where the Left Button was pressed, to make it easier to calculate how much power you need to hit your object.

    I got some ideas while searching the web, but it was not for the Construct2 engine..

    I think a good idea would be to split the function up into parts.

    One being to use variables to keep the information about how far the string was pulled.

    And then Fire a "Arrow" with physics and a Denser Physic at the Arrow Head.

    Fire the Arrow with the amount of range between

    Mouseclick and MouseRelease

    No idea how to though..

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

  • Some time ago I did a quick capx with the basics for archery.

  • Might be worth checking the Post:

    link

  • My good old November capx

    Still seems nice to me, you even get the wiggling for when you put too much strength

    arrow.capx

  • Yann very good example :)

  • Thanks all :D!

    chrisbrobs i couldn't open your example from the link :)

    Im gonna stick with Yann's Script until i figure out how to do exactly what i want^^

  • Any quick idea how i could make arrows stick in the Solids they hit?

  • on Collision -> set speed to 0

  • Hehe.. that makes the arrows go straight into the ground, and they just float out. I think i need to look at some Create Object, and create it in the impact degree

  • Yep that worked:) ty though and thx for the whole script

  • Schoening Hi can please help how i could make arrows stick in the Solids they hit. Thanks

  • I was messing about with arrows last night, I got them to stick in the walls fairly easily, I did something like this:

    Event: [Arrow] On Collision with [Wall Object]

    Actions: [Arrow] Set speed to 0

              [Arrow] Set Angle to Self.Angle

              [Arrow] > Bullet Behaivour > Set Disabled

    If you have more than one type of solid object then put them in a Family and replace [Wall Object] with the family name

    (EDIT: Actually I think I removed setting the Angle as it wasn't necessary, but I don't think it hurts)

  • SecondDimension

    Thank you work like a charm. <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • HI Guys,

    I'm looking for action -- And then Fire a "Arrow" with physics and a Denser Physic at the Arrow Head ---

    I need to simulate the flight of the arrow.

    When arrow's reaching max height

    1. The edge of the arrow should fall first and only after the body of the arrow.

    My arrow instead flight like peace of crap (fully solid object with center of the mass in the center). Dropping on body of the arrow first

    I have broken my head already.

    Do you have any Ideas?

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