Grappling Hook effect

This forum is currently in read-only mode.
  • Hello! I have just started making a .cap with prototypes of all kinds of games/effects. The only thing i have in it now is Grappling Hook Test.

    I want a rope/chain thingy to Grapple. Much like the blue laser/ghostkiller beam in The Rain(demo section) http://www.scirra.com/construct/demos.php

    How can i do this

    I have played the game but cant figure out how its done without a .cap to show

    Any help would be...helpful.

    EDIT: links dont work

  • A grappling hook is a pretty complex thing to create.

    One simple way you might try is to draw a line (or stretch a sprite) from the player to the target. When the line or sprite reaches the target, make it shrink from the other end and set the player's position to the end of it.

    Of course, that is a very simple method and it doesn't take into account swinging or collision, but you could expand on it from there.

    You may not want to use Platform behavior for your player, especially if you want to swing back and forth. You're looking at some hard math involving sin and cos to do that.

  • for swinging, make sure the hotspot (which should be in one extreme of the stretchable rope sprite) is set to the pivot, then set the size according to the distance between the player and the pivot and the angle according to the angle between them.

    Now you can rotate the rope and set the player to the other end of the rope (an image point would do). I haven't given any thoughts to swinging speed, but you can probably take advantage of the Sin behavior, set to angle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yay for necroposting!

    was Rain cap ever released? who created it?

    its unlogical for a tutorial to have just exe without cap.

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