How do I power-up pool cue?

Get help using Construct 2

Post » Fri Feb 27, 2015 6:20 pm

I'm trying to power-up a pool cue and aim it with the touch gesture for a phone game. This procedure works fine on my Windows 8.0 with a Cintiq Touch Screen, you touch the screen and swipe toward where you want the ball to go and off it goes when you lift, but it does not work on my Samsung Galaxy Note.

1 [Mouse] Left button is down/ Power/ Set with to power.with+Power
2 [Mouse] Right button is down/ Cue/ Set position to (Mouse.X, Mouse.y)
/Cue/ Set Visable
/Power/ Set to 1
The above events work fine on a desktop computer it's the below event that only works on my Windows Cintiqu Touch screen, I'm trying to get it to work on my phone.

3 [Touch] On any touch end/ Power/ Set with to power.with+Power

Any advice Thanks Jer
B
15
S
3
Posts: 4
Reputation: 3,004

Post » Fri Feb 27, 2015 6:27 pm

How about checking the distance between the mouse and the pool que, and determine power from that ?

mousebutton is down
power = distance(que.X,que,Y,mouse.X,mouse.Y)

You could ofc run the outcome of the distance calc through some formula so it fits your need.

For aiming, I would use

mouse is down
que set angle to angle(mouse.X,mouse.Y,que.X,que.Y)
Who dares wins
B
56
S
16
G
21
Posts: 1,875
Reputation: 19,406

Post » Fri Feb 27, 2015 6:36 pm

thanks lennaert I'll try that. It will take me a while but I'll get back to you. Jer
B
15
S
3
Posts: 4
Reputation: 3,004


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Cool Gamez, marcoscodas and 8 guests