User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: help multi touch for on screen move button (4 buttons for 8 ways)

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Jun 2019
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help multi touch for on screen move button (4 buttons for 8 ways)

    hello i need help with the codes for move button
    i always fail when i tried to touch more than 1 object (only can touch 1 object at the time) , and i already used multi touch object
    so i had move button like below, 4 separate object.


    i already can do up, bottom, left, right

    and what i want is, if you press top button and right button at the same time it will move like this



    so basically from that 4 button, you can move 8 way like this


    i am confuse about how to do it and how to implement multi touch correctly
    any help will be much appreciated
    Images attachées Images attachées

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    865
    Mentioned
    99 Post(s)
    Tagged
    0 Thread(s)
    Rather than doing something complicated with the touch object you could try to do something with flags like this:

    * Multiple Touch: A new touch on object UP has started
    + Active: Flag 0 is off
    Active : Set direction to UP
    Active : Set speed to 20
    Active : Set Flag 0 on


    * Multiple Touch: A new touch on object RIGHT has started
    + Active: Flag 0 is off
    Active : Set direction to RIGHT
    Active : Set speed to 20
    Active : Set Flag 1 on


    * Multiple Touch: A new touch on object RIGHT has started
    + Active: Flag 0 is on
    Active : Set direction to "4"
    Active : Set speed to 20
    Active : Set Flag 1 on


    * Multiple Touch: A touch has ended
    Active : Set Flag 0 off
    Active : Set Flag 1 off

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Jun 2019
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    Rather than doing something complicated with the touch object you could try to do something with flags like this:

    * Multiple Touch: A new touch on object UP has started
    + Active: Flag 0 is off
    Active : Set direction to UP
    Active : Set speed to 20
    Active : Set Flag 0 on


    * Multiple Touch: A new touch on object RIGHT has started
    + Active: Flag 0 is off
    Active : Set direction to RIGHT
    Active : Set speed to 20
    Active : Set Flag 1 on


    * Multiple Touch: A new touch on object RIGHT has started
    + Active: Flag 0 is on
    Active : Set direction to "4"
    Active : Set speed to 20
    Active : Set Flag 1 on


    * Multiple Touch: A touch has ended
    Active : Set Flag 0 off
    Active : Set Flag 1 off
    hey thank you for the reply, i want to ask how to make the object constantly moves when we pressed the button?
    because it only moves once and only when i pressed the button
    i know how to it with *mouse (which is repeat while mouse-key is pressed) but when i tried to add that condition, it doesn't work with multiple touch.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    865
    Mentioned
    99 Post(s)
    Tagged
    0 Thread(s)
    If you give every direction their own flag then you can just use:

    * Active: Flag 1 is on
    Active : Set direction to ...........
    Active : Set speed to 20

    And do that for every flag and every direction. Because the flags are reset when the player releases the touch, it will automatically then stop the object from moving as well.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Jun 2019
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why i can't make multiple touch works, my code already correct.
    it always 1 touch max in my phone
    i already put 12 max touch
    should i turn something on in properties or maybe something else?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    865
    Mentioned
    99 Post(s)
    Tagged
    0 Thread(s)
    In my example, I have the object that must be moved set to the 8 direction movement - which is the user-controlled movement. Maybe you're using a different movement?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Jun 2019
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    In my example, I have the object that must be moved set to the 8 direction movement - which is the user-controlled movement. Maybe you're using a different movement?
    yes i already set the movement to 8 direction movement which is user controlled movement. it can move 8 ways with keyboard.
    and it can moves only 4 way if using my on-screen buttons.
    the problem is i can't make multiple touch works..

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    865
    Mentioned
    99 Post(s)
    Tagged
    0 Thread(s)
    Here is a short example - it works on my touchscreen pc - I've just done 3 directions.

    You may have to provide for all possible scenarios i.e. this works when you first touch the up button and then the right button - but you'd also have to provide for a scenario where the player first touches the right button and then the up button.

    You can check to see if there are any settings on it different from yours - I changed the Android settings to the default that they should be.
    Attached files Attached files

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Jun 2019
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey sorry for the late catch up, i already tried yours and it's the same.
    i can't do multiple touch, it won't allow me.
    and i am using mobile to make sure
    btw my previous code already similar to yours.

    do you tried yours in mobile?
    i saw some thread in ios, they said you have to turn on multiple touch first.
    did android also has the same option?

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    865
    Mentioned
    99 Post(s)
    Tagged
    0 Thread(s)
    There is no setting for Android.

    If I take the example, exactly as I gave it to you, and build an .apk it does work on my cell phone - the 3 movements that I put in the example, up, right and diagonally up.

    Does nothing for multi-touch work on your device? Not even the up and right? If so, perhaps you should give Fernando your device details and a log file and let him check why multi-touch won't work on your device.

    I've used multi-touch in my games - it's always worked fine by me.

    Are your SDK's etc. all up to date?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Multi Touch Buttons to android
    By warlords in forum Android Export Module 2.5
    Replies: 2
    Last Post: 11th February 2019, 07:34 AM
  2. touch screen input not responding when using multi touch
    By no7mac in forum HTML5 Export Module 2.5
    Replies: 14
    Last Post: 30th January 2019, 03:42 PM
  3. Virtual Buttons for Touch Screen
    By repapermunky in forum Fusion 2.5
    Replies: 5
    Last Post: 26th January 2017, 03:30 AM
  4. 2 Button Control / Using parts of the screen instead of buttons
    By gnodab2 in forum Android Export Module 2.5
    Replies: 3
    Last Post: 10th September 2014, 09:47 PM
  5. Touch based platformer (no on-screen buttons) Has this been done before?
    By Pineapple in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 22nd February 2012, 08:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •