Platformer - Shoot Arrow.

Get help using Construct 2

Post » Wed Jan 25, 2012 12:34 am

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
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed Jan 25, 2012 1:06 am

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

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed Jan 25, 2012 1:21 am

Might be worth checking the Post:

link
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Wed Jan 25, 2012 6:50 am

My good old November capx
Still seems nice to me, you even get the wiggling for when you put too much strength :D
arrow.capx
Last edited by Yann on Sun Sep 14, 2014 9:50 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 25, 2012 8:18 am

Yann very good example :)
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Wed Jan 25, 2012 12:40 pm

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^^
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed Jan 25, 2012 1:11 pm

Any quick idea how i could make arrows stick in the Solids they hit?
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed Jan 25, 2012 4:40 pm

on Collision -> set speed to 0
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 25, 2012 5:19 pm

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
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed Jan 25, 2012 5:24 pm

Yep that worked:) ty though and thx for the whole script
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests