Platformer 'hookshot' not working and unsure why? (pictures included)

  • Hey there,

    Before I begin, please not I'm less than a week old to C2, so apologies if this is a stupid or obvious question. I've been trying to add a 'hookshot' style item into a platformer I've been making and I just can't seem to get it right. What I want it for the player to be able to click in the direction around the character sprite, a rope is fired and then the player shoots off into that direction if a solid point is hit.

    To do this, I've created a test purpose sprite called 'hookshot' which is always on the player centre; this follows the cursor around and and then spawns the 'hook' when clicked. The issues I'm having are these:

    1) The sprite isn't moving with the hook when it makes contact.

    2) The rope ('hook') that spawns on the 'hookshot' shoots off in two different directions, see image below.

    imgur.com/I4Az6vH

    3) Because of point two, the rope doesn't spawn at all because in most cases as it gets destroyed because the other direction 'rope' recognises the solid floor below the character and so only works when jumping or at a particular angle such as the image above.

    I've included a screenshot of the event 'code' I'm working with below, if anyone can tell me where I'm going wrong, I'd much appreciate it. I bet it's something incredibly simple I'm missing, but I've spent ages on this now. Thank you all for your help!

    Code:

    imgur.com/Bqrayzi

  • Look at my following example to hookshot

    hook_chain.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This flows really well! The only problem is I keep getting stuck on platforms with it and there's no means of release unless I restart...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)