I need help, how to fix this problem?

Get help using Construct 2

Post » Tue Jul 15, 2014 10:15 am

hi there, I need some help here.

I have download the example for MetalSlugLike games for Construct 2.
I just make some adjust for touch screen games.

I make game for 2d shooting, touch screen target shoot also platform moving player.

But I face some problem here:
- when I touch left / right / jump player will make player hand change angle too
the hand angle change into left/right/jump button angle.
- when player move, player cannot shooting

*I add some WHITE sprite when TOUCH enable in screen (WHITE sprite) so player shoot enable
*If pressing touch left/right/jump shoot disable.

The problem is, player HAND always set position whenever I touch the screen.
I want player HAND only set position angle when I touch the WHITE SPRITE

* This game don't have problem when use Keyboard to move player
* I only face problem when using TOUCH for mobile games.
* I test this with CooconJS Launcer.

I don't know how to fix this. can you help me ?

here's the capx file
http://www.sabah.net.my/redzone/games/capx.rar
B
41
S
5
G
3
Posts: 49
Reputation: 5,502

Post » Tue Jul 15, 2014 2:24 pm

Couldn't test it in a touch device, but this should work. Let me know if it doesn't. :)

capx.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
3
Posts: 637
Reputation: 3,776

Post » Wed Jul 16, 2014 5:10 pm

Firstly, thanks for the help and reply my msg. :)

I have test the capx, and test it in mobile. Nothing change, still same when I touch left/right/jump button,
the player hand still set to touch angle.
B
41
S
5
G
3
Posts: 49
Reputation: 5,502

Post » Wed Jul 16, 2014 6:27 pm

You have an action that sets the hand towards touch.x, touch.y every tick,
so whenever you touch the screen the hand wil be pointed there.. (So also when you touch the buttons on the bottom)
Whenever you are not touching the screen it will point at the upper left corner or when mirrored to the position the upper left corner is mirrored, for no touch means touch.x and touch.y are both 0..
You are going to have to work with touch ID to enable multitouch and add an event for the hand to point forward when not touching..
Also you should add conditions so when touching the buttons the hand will not be pointing towards them..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 19, 2014 9:17 pm

LittleStain wrote:You have an action that sets the hand towards touch.x, touch.y every tick,
so whenever you touch the screen the hand wil be pointed there.. (So also when you touch the buttons on the bottom)
Whenever you are not touching the screen it will point at the upper left corner or when mirrored to the position the upper left corner is mirrored, for no touch means touch.x and touch.y are both 0..
You are going to have to work with touch ID to enable multitouch and add an event for the hand to point forward when not touching..
Also you should add conditions so when touching the buttons the hand will not be pointing towards them..


I understand what you mean, But I dont know how to do this. Im still new in Construct 2. Thats why I just only use some basic method. Can you fix this problem?
Also, I still dont know much how to use touch screen button, thats why I face this problem :(
B
41
S
5
G
3
Posts: 49
Reputation: 5,502

Post » Sat Jul 19, 2014 9:42 pm

You are trying to create a game playable for touchscreen, but you don't understand how..
I could do it fior you, but for me also it would consist of a lot of trying, albeit with a little more background information..

You are going to have to read up on touchID, for without it multitouch is impossible to implement..
you could add conditions if touch.x=0 and touch.y=0 and tell the character at what angle to hold the gun.
you could also add a condition if touch.y> a certain value to not point the gun there..
But the more difficult part will be the multitouch and working with the touchID..
It's been a while since I did that and I must say I've forgotten most..

I used it in my Thumbstick example:
viewtopic.php?f=147&t=93310&p=726997&hilit=thumbstick+example#p726997

Maybe looking how I did it there could help you..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: dop2000, tarek2 and 15 guests