User Tag List

Results 1 to 9 of 9

Thread: How can I do the hookshot code in Fusion?

  1. #1
    No Products Registered

    Join Date
    Jan 2017
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I do the hookshot code in Fusion?

    I want to make one of those hookshots like in zelda. Like i use the mouse to aim, then click, rope or chain comes out,the player goes to where the hook is. Any way this can be done?

  2. #2
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    After the hook shot is fired, you would need to modify the players X and Y position toward the hook shot. So you would write the player to follow the hook shots path somehow.

    EDIT You know what? I went ahead and made an example for you.
    My logic went something like this. I've added the rope in between the player and the arrow as well.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Here is an updated version of my hook shot code.
    I have adjusted the action points, and added a Fast Loop script for faster arrow shoot speeds.
    Though there STILL seems to be a slight issue if the movement speed is set to anything 50 and over. For instance, if retracted, you can see the arrow go behind the player for a split second before it removes itself. I don't know how to fix that, which was the point of the fast loop script.
    Attached files Attached files

  4. #4
    No Products Registered

    Join Date
    Jan 2017
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HOLY CRAP this can work in my fusion game!!! Thanx for that!

  5. #5
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    You're welcome.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    For anyone interested, I have made a slight update on the hookshot code.
    I never liked it where setting the move speed any faster would sometimes show the arrow behind the player during retraction. The only thing I could check for is a condition where it now checks for the scale of the rope/line. If the value of the scale is anything below 0, it should be removed. The arrows fast loop function is now limited to the line scale is anything higher than 0.
    Everything else I've tried, the arrow kept going behind the player if the speed was 50 or over.
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    962
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    wow thats a really cool example. u always do awesome stuff! thanx 4 sharing

  8. #8
    No Products Registered

    Join Date
    Aug 2017
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you make a tutorial, I am struggling to implement this into my game

  9. #9
    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
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Imperdius View Post
    Could you make a tutorial, I am struggling to implement this into my game
    N64Mario's example is very straightforward and clearly arranged. Are you still struggling with this?

Similar Threads

  1. Fusion 2.5 Source Code Game Templates
    By DrWho in forum Fusion 2.5
    Replies: 4
    Last Post: 13th April 2016, 04:38 AM
  2. code 'snippets' for Fusion 2.5?
    By Dex in forum Fusion 2.5
    Replies: 6
    Last Post: 14th August 2015, 03:59 PM
  3. plug a C++ code into Fusion
    By ADS_3000 in forum Extension Development
    Replies: 10
    Last Post: 20th June 2014, 09:34 AM
  4. Fusion 2.5 Developer - Looking for Code optimization and/or Consultation.
    By Logiq121 in forum Paid Design & Development Requests
    Replies: 0
    Last Post: 12th March 2014, 04:56 PM
  5. Hookshot
    By JimmyTHicks in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 25th November 2012, 03:05 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
  •