I need help, how to fix this problem?

0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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

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

    [attachment=0:3fljlwjf][/attachment:3fljlwjf]

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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..

  • 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

  • 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:

    Maybe looking how I did it there could help you..

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