User Tag List

Results 1 to 10 of 10

Thread: Help with Alterative Adv Direction Object

  1. #1
    No Products Registered

    Join Date
    Jul 2016
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Alterative Adv Direction Object

    Hello again!

    So basically I have two joysticks in my game. I used the example by 'willy' for touchscreen joysticks for android, however, the Adv Direction object he uses breaks the build when I try and export to Android in my version (as in I get a build error).
    The Adv Direction object basically compares the direction of the player's finger and the actual joystick. I'm just wondering if anyone could help me with an alternate way of comparing the directions without using the Adv Direction extension.

    It works like this;
    +Players finger on joystick
    -Set angle of joystick to AdvDirection( "Advanced Direction Object", X( "Joy2" ), Y( "Joy2" ), X( "finger" ), Y( "finger" ) )

    The angle of the joysticks is what controls the player's aim and movement.
    I can also provide the build error log if you want to see it

    Any help would be really appreciated!
    Thanks in advance.

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Volniskra did a mighty tool for gamepad control. Please check following link.
    http://clickstore.clickteam.com/vaccine_universal_gamepad?keyword=joyst

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    652
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Eventually you have an outdated Fusion build. Make sure that Fusion is up to date.
    You get the build error only with Advanced Direction object?
    For the error log and similar questions related to Android I would suggest that you use the Android Exporter Sub-Forum.

    This is the custom equivalent of your AdvDir object expression: ATan2(Y( "Joy2" ) - Y( "finger" ), X( "finger" ) - X( "Joy2" ))

  4. #4
    No Products Registered

    Join Date
    Jul 2016
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey thanks so much for the replies both your answers were very helpful;

    alexexhowl - I believe the tool you linked is for gamepad control, I was looking instead for touchscreen joysticks, however I will make sure to use the tool in future for my PC version of the game as it seems incredibly useful for gamepad support

    Wodjanoi - this is exactly what I was looking for thanks so much! I also didn't realise my Fusion was out of date and I believe this was the problem, however I think I will use your method, as I like to be able to see and know exactly what each part of my game does, rather than the hidden maths that the Adv Direction object does. Thanks again!

  5. #5
    No Products Registered

    Join Date
    Jul 2016
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok guys, I'm unfortunately back with a new problem; the multi touch object doesn't seem to pick up any touches on Android. It works perfectly fine on my PC but nothing happens on Android. I can still interact with buttons I have set to 'On mouse clicked on an object' in the event editor.

    Any ideas as to why multi touch isn't working?
    Thanks again for any help!

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    357
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    can you attach example? or screenshot of your event.

  7. #7
    No Products Registered

    Join Date
    Jul 2016
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure thing here it is:

    simplegeometryNOSOUND.mfa

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    652
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    You can solve the problem with a fresh project file.
    I attached a fresh copy of the old example.
    It's the same example, but I didn't include any sound files - you have to choose your sounds again.
    Attached files Attached files

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Just so you know Fusion has a built in expression that calculates that ATan2 equation above easily. It's also faster I believe. It's an expression that you retrieve by clicking on your active object > Position > Angle of a vector.

    OAngle( "Joy2", X( "finger" ), Y( "finger" ) )

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    652
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    So, the calculation with the easy built-in function is faster - that's good to know.
    This was new to me and it's a very useful hint actually. Thanks Sumo.

Similar Threads

  1. Active Object Direction Help...
    By Jusfury in forum Fusion 2.5
    Replies: 2
    Last Post: 28th July 2014, 12:56 AM
  2. global value direction of object
    By swiftlikeninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 6th March 2010, 01:43 AM
  3. Create object -> Set direction -> Bug?
    By Jarzka in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th April 2009, 12:45 AM
  4. Advanced Direction Object BUG?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th January 2009, 03:36 PM
  5. how to add 2 to an object's direction
    By Simion32 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st February 2007, 07:16 PM

Tags for this Thread

Posting Permissions

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