User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24

Thread: Need help with a touch command

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

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with a touch command

    Hey,
    I am having an issue doing a good touch command for movement using our own movement engine. Basically have this command.

    Repeat while left mouse is pressed
    + Mouse pointer is over object

    = Move the character.

    Now that works just fine, until i press on the shoot button. Once i press on the shoot button. which is using Fusion built in touch buttons. The character stops moving. So basically the above command stops working, and i have to release the screen and press it again.

    So basically i need to be able to be holding the move button and be able to press the shoot button and the character should still be able to walk. I am not using the Fusion Joystick. I am using my own movement buttons.


    here is the 2 lines of code that i have. So i am pretty sure i have to correct the movement line for it to continue to accept that line while the shoot button is pressed. Anyone can give me a better way that i should do this. Thanks

    here is image link if that pic is showing up to small
    http://i60.photobucket.com/albums/h12/Power2r/muliTouchproblem.jpg

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Aug 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    Check my replay in:

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Main=33830&Number=2464 05#Post246405

    Tell me if you need more help.

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

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    I am still a little lost on which commands I should be adding to help my problem.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    you need to replace the mouse action with a touch action via the multi-touch object.

    the multi-touch object is basically like the mouse object and can read clicks (touches), but can handle several at once, something which the default mouse can't.

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

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    Yes, but how does it know which object i am over. I only see commands like:
    A new touch as occurred.
    How do i translate that touch to a button that i have on the screen. Do i still need to use a mouse command stating that the mouse cursor is overlapping an object? If so would it have to look something like this?



    (Maybe i just don't understand how the Multi Touch Object works.)


  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    I think you might need to compare the x and y of the touch and make sure it's within a boundary of the object you want it over.

    So something like this (if your hotspot is centered in your object). What i'm doing is basically drawing an invisible square boundary and figuring out if the touch co-ordinates are within it while the touch is occurring.

    The values below would be for a 32x32 sized object.

    A new touch has occurred
    + touch x > (active x - 16)
    + touch x < (active x + 16)
    + touch y > (active y - 16)
    + touch y < (active y + 16)

    - Do events

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    You could also have a 1x1 object and set its X and Y to the X and Y touch and see if it overlaps the object. You could loop through and have multiple of these associated with each touch, I think...
    Working as fast as I can on Fusion 3

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    I am sorry , but I am still having trouble getting this to work. I am not seeing a command that will allow me to do :
    touch x > (active x - 16)

    I am only able to check for a touch number. I do not find anything that allows me to check for a touch position.



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

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    Ok, so this is what I got so far


    However, this command does not seem to loop. This is an actual Up Arrow, so when user is touching this arrow. The player should walk up.
    So when i press on the arrow now. It basically just runs the command once. So i am getting close. Just need to figure out how to loop this touch command now.

    Thanks ahead for all the help so far.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module

    Join Date
    Nov 2010
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with a touch command

    Anyone?

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Duplicate Command
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th October 2013, 03:55 PM
  2. override touch with next touch
    By SolarB in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 16th January 2013, 06:05 AM
  3. Best way to do a while not command
    By Netflyer165 in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 23rd April 2012, 03:23 AM
  4. Insert command
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 30th June 2006, 10:25 PM

Posting Permissions

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