User Tag List

Results 1 to 3 of 3

Thread: Having trouble implementing swipe movement...

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Apr 2009
    Location
    Paris, France
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Having trouble implementing swipe movement...

    I am trying to fire an object left, right, up, or down based on the player making a swipe motion anywhere on the screen. It is working perfectly on my PC, but when I run the code on my iPhone (or the simulator) the object fires the instant I touch the screen. Any suggestions?

    Here's the pseudo-code:

    Left mouse button clicked
    + Set Global Value M to Xmouse
    + Set Global Value N to Ymouse

    Repeat while left button down
    + Set Global Value O to Xmouse
    + Set Global Value P to Ymouse

    X Repeat while left button down
    + Set Global Value M, N, O, P to 0

    Distance (using Clickteam Movement Controller) between M, N and O, P > 15
    + Set Global Value Q to angle between M,N and O,P

    Based on the angle I fire the object left, right, up or down.

    NOTE: The first time I tried to build the [final] project in XCode I got a bunch of errors about missing Crunclickteam_movement_controller.h and .m files. I had to use the standard build option. Is there a problem with the iOS version of the Clickteam Movement Controller? Is that causing my problem, or am I just detecting touches incorrectly?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You might be able to do this using the Touch Delta expression from the Multiple Touch object. Have a read about it in the documentation.

    Otherwise, try these changes:

    Repeat while left button down & Only one action when event loops
    + Set Global Value M to Xmouse
    + Set Global Value N to Ymouse
    + Set Global Value O to Xmouse
    + Set Global Value P to Ymouse

    Repeat while left button down
    + Set Global Value O to Xmouse
    + Set Global Value P to Ymouse

    Distance (using Clickteam Movement Controller) between M, N and O, P > 15 & Only one action when event loops
    + Set Global Value Q to angle between M,N and O,P

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Apr 2009
    Location
    Paris, France
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using the Multiple Touch object fixed my problem. I hadn't spent much time looking at that object because I thought it was all about... well... *multiple* touch. It's a really powerful object for games that use just a single touch, too.

Similar Threads

  1. Trouble with DavidN's Fastloop Custom Platform Movement
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 27th June 2014, 01:04 PM
  2. Replies: 1
    Last Post: 6th November 2013, 08:12 PM
  3. Trouble with Drag and Drop Movement with Windows 7
    By GnadeGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th October 2010, 07:44 AM
  4. Having trouble with fastloop enemy movement
    By Fralex in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th September 2010, 11:43 PM
  5. Worm Movement Trouble
    By Rockdude in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 26th December 2009, 08:19 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
  •