How do I make a bow and arrow shoot

Get help using Construct 2

Post » Mon Aug 08, 2016 8:38 pm

Message: nachoona can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello people, I'm making a platform game, and I wanted to make a bow shooter like this one:
https://www.youtube.com/watch?v=jHVDyPae82A

These are the events I made, but they are obviusly wrong
Image

My idea was to make an object called "InitialPoint" that is created where I first tap on the screen, and then when I drag, it would calculate the angle beetwen the point I dragged and the "InitialPoint".
I don't know if those events are ok, but when I move my mouse, the "InitialPoint" is where the red doot is, I want it to be like the youtube video.
I would really appreciate a suggerence or idea, thank you, and I'm sorry if there's an spelling mistake, my native language is spanish.
Image

Thank you.
B
3
Posts: 2
Reputation: 179

Post » Mon Aug 08, 2016 10:58 pm

I have a suspicion that 'on tap gesture' relies on the user touching and releasing - similar to the difference between 'key is down' and 'key is pressed' in the Keyboard object, or 'mouse button pressed' / 'on click'.

I'm assuming your users will touch to begin aiming, and release to fire? I can't view the video (very poor internet connections here) so can't verify what you're trying to do, but this is my best guess. If this is the case, you'll want to use 'On any touch start' instead.

[ Edit: Can confirm, through use of RTFM - tap is a touch and a release within a given time-frame:
https://www.scirra.com/manual/119/touch ]
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Tue Aug 09, 2016 5:01 pm

Message: nachoona can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
mrtumbles wrote:I have a suspicion that 'on tap gesture' relies on the user touching and releasing - similar to the difference between 'key is down' and 'key is pressed' in the Keyboard object, or 'mouse button pressed' / 'on click'.

I'm assuming your users will touch to begin aiming, and release to fire? I can't view the video (very poor internet connections here) so can't verify what you're trying to do, but this is my best guess. If this is the case, you'll want to use 'On any touch start' instead.

[ Edit: Can confirm, through use of RTFM - tap is a touch and a release within a given time-frame:
https://www.scirra.com/manual/119/touch ]


Exactly, I want to do that, but I want that he can touch anywhere on the screen, and a bow will appear, and he could choose the power and the angle, just like angry birds.
I will try if I can do something with that manual, thank you.
B
3
Posts: 2
Reputation: 179

Post » Tue Aug 09, 2016 6:37 pm

Just change 'on tap' to 'on touch start'!
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: beohs, ignaciosimo, nickar and 36 guests