User Tag List

Results 1 to 8 of 8

Thread: Can i please have help with clickteam?

  1. #1
    No Products Registered

    Join Date
    May 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can i please have help with clickteam?

    Hey guys, I'm currently trying to figure out how to make a similar ball firing mechanism to the game Trick Shot. Where you can click drag and launch a ball in the opposite direction you dragged back at. Check out the game Trick Shot in the video below and you will get what I mean. I'm just having difficulties with firing the ball in the direction I want, think I have managed to get the drag back OK. I'm a beginner with Clickteam and just working on an idea I have! Would be lovely if you guys can help!

    Trick Shot example: https://www.youtube.com/watch?v=Cli3Pa14Q2I

    Regards

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,297
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    You would need to find the angle between the position of your current touch and the position that your touch first initialized at. You can use the Multitouch object to find the angle. Movement just uses a basic vector equation. Here is a quicky example:
    Attached files Attached files

  3. #3
    No Products Registered

    Join Date
    May 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    You would need to find the angle between the position of your current touch and the position that your touch first initialized at. You can use the Multitouch object to find the angle. Movement just uses a basic vector equation. Here is a quicky example:
    Thank you for the example mobichan, i've been trying to use the MultiTouch object and never really got to grips with it. I tried to implement your example to my game, but its not launching the ball in the forward direction of the drag back. Any ideas on how I can do this?

    Also, its only letting me create the ball at a single point, in this case point (167,77), do you know any way I can touch the screen anywhere in the designated Multitouch area (check out multitouch in my frame editor) so it will launch the ball from the origin of my touch?

    mobichan, I really appreciate your help! Your awesome!

    Drag and Launch 2.mfa

    Regards

  4. #4
    No Products Registered

    Join Date
    May 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Forgot to add my file!


    Drag and Launch 2.mfa

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,297
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    It looks like you are trying to use the "gesture" feature of the Multitouch object. i haven't used that one yet tbh. But the way the object normally works is that you can tap anywhere (just like you would with a mouse cursor). I am not totally clear what you are trying to do. Do you need the ball to always shoot from a fixed location? Should it fire from your touch position? Can you explain your goal a bit better?

    EDIT: BTW, I just realized you are using the bouncing ball movement. That is why the ball is going in random directions. That movement is overriding the movement code I wrote by choosing a random angle.

  6. #6
    No Products Registered

    Join Date
    May 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    It looks like you are trying to use the "gesture" feature of the Multitouch object. i haven't used that one yet tbh. But the way the object normally works is that you can tap anywhere (just like you would with a mouse cursor). I am not totally clear what you are trying to do. Do you need the ball to always shoot from a fixed location? Should it fire from your touch position? Can you explain your goal a bit better?

    EDIT: BTW, I just realized you are using the bouncing ball movement. That is why the ball is going in random directions. That movement is overriding the movement code I wrote by choosing a random angle.


    Hey mobichan, I'm pretty sure i'm not using the "gesture" feature, well i hope i havent lol!

    My goal is to be able to drag back from any position on the grid so that a ball can be launched from the initial touch position. I want the speed and distance at which the ball travels to be dependant on how far back I drag from the first touch. E.g. a small drag back will mean the ball is fired at a short distance, a large drag back will mean the ball will be fired at a longer distance.

    Therefore, in response to your questions:
    I need the ball to shoot from the initial touch position, not just a fixed position.

    In response to your edit:
    ahhh ok! i will try and change the bouncing ball movement, however I still want the ball to bounce off the edges once fired lol! Is this really difficult to do?! Ive got a feeling it is!

    The video below will show you pretty much what I want to achieve:
    https://www.youtube.com/watch?v=Cli3Pa14Q2I

    Thanks so much for your help! this community and yourself are so helpful!!!

    Regards

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,297
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    Here ya go. You need to play with the ball's physics settings to get it to do what you want. Also, you can't use normal backdrops if you want the collisions to work. I have made a few comments in the file so you can see what I changed.

    PS. I mentioned the "gesture" feature because that check box was on in the multitouch object's properties. You also had the object displaying as a "zone" instead of simply an object icon. This was because of that feature.
    Attached files Attached files

  8. #8
    No Products Registered

    Join Date
    May 2016
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dude!!!!! you have got it! I literally cannot thank you enough, thanks for helping me with some amazing comments too. Truly makes so much more sense now.

    YOUR THE KING MOBICHAN!

Similar Threads

  1. Replies: 0
    Last Post: 6th December 2013, 12:01 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
  •