Having trouble un-pinning...

0 favourites
  • 6 posts
From the Asset Store
Wall Pin Board
$9.80 USD
30% off
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • Hi, I'm trying to make a certain thing happen wherein the player object overlaps the 'puck(or ball)' object, the puck sticks to the player object until the player then left clicks and the puck object is fired in the direction of the players mouse pointer.

    I've included the event sheet I've came up with while tooling around with this idea to make my question slightly less of a jumbled mess.(apologies in advance, i really have tried to think of a clearer way of wording all of this)

    From said messing around, I've managed to get the puck to pin to the player object when it overlaps with it and that's all well and good(i also managed to set the position to the player x and y co-ordinates such that it would overlap the center of the player rather than stick round the edges).

    I set the physics to immovable for both player and puck to fix an error i had where it would shoot all over the screen even when the keys weren't pressed. So now I wan't to be able to click-hold to charge up a shot and then release to unpin to puck object from the player and shoot it towards the mouse cursor. I've tried setting an apply physics force to mouse.X and mouse.Y but to no avail, it just stays pinned there and i don't know how to proceed. Any help would be greatly appreciated if you can find the time,

    Thanks, one grateful newbie! <img src="https://dl.dropboxusercontent.com/u/151998804/eventSheet.png" border="0" />

  • If you can't see the image for some reason or another, here's the link : dl.dropboxusercontent.com/u/151998804/eventSheet.png

  • Debugging with the Developer Console

    I think it would help you to use ths extension, with it you can post to the developer console of your browser. This means you can easily check in every situation if the object is unpinned or not.

    You can also check if events get trigered.

    If this alone doesn?t help you, you should give us an example .capx or a better (bigger picture)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, i can't seem to get the plugin working but i'll keep trying!

    Paul.

  • I can't see any "release puck" code , but It's probably due to the puck still overlapping player setting haspuck true continuously...

    A good idea would be set it to a position just outside the players collision box on release...

  • Thanks for the reply again pixel, I managed to fix this by going and re-doing my whole event list more coherently. It all just sort of fell into place and i have it working now.

    Paul.

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