How to make bullet follow the line just drew

1 favourites
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • ramones fantastic! Nailed it.

  • ramones you are a GENIUS!!!

    I have one more favour to as of you and I will leave you in peace I promise!

    I'm really struggling with this which is why I am asking, but I would like to amend your capx so that I have multiple instances of the rocket already on the layout, and I would like them to have a speed set from the start, so they are all moving slowly in a direction when the game starts. I then want to be able to click on a rocket and then draw the path for that rocket

    Problems i have are setting an initial speed causes the rocket to just jump down the page vertically while i am drawing the line

    another problem is when i mouse up after drawing the line, i am then able to drag and drop more lines which get joined on to that one.

    I set this up by simply setting an initial speed on the rocket and changing the line where you spawn an instance of the rocket, i changed it to detect the mouse click over an instance of the rocket

    Any help super appreciated and I will definately be adding you to the credits with massive praise when this is done

  • I thought it might help if I gave you a capx of what I've done:

    dl.dropbox.com/u/73268676/controller.capx

    youll see i have changed the rocket to 2 monsters for now, and made them bigger so i can click them easier for the test, slowed it down too

    if you click on a monster instance and draw a path the monster starts flying off all over the place, i tried setting the dist_to_next back to 0 on the mouse click which helps but still similar results

    basically what im after is you should be able to click on a monster and draw its path, it will follow it BUT if you click on it again while its on that path and draw a new path, the original path should be dtestroyed and it should move to the new path

    I played about with looping the dashes where the rocket variable was the instance you cclicked on and destroying them but then it doesnt move at all, maybe i was destroying the first one straight after it was created, i dunno, I'm really stuck

  • I got it all working now thanks for the info

  • THANKS! I am trying something similar

  • Here is a way to make the rocket follow the path:

    http://dl.dropbox.com/u/5426011/example ... line2.capx

    The dashes have a variable to indicate which rocket uses it so each rocket will follow it's own path.

    Anyone out there have this capx, I really need this for my project. thanks in advance

  • LaroTaio

    fixed link

  • LaroTaio

    fixed link

    R0J0hound

    Thank you so much sir

  • > Here is a way to make the rocket follow the path:

    > dl.dropbox.com/u/5426011/example ... line2.capx

    >

    > The dashes have a variable to indicate which rocket uses it so each rocket will follow it's own path.

    >

    Anyone out there have this capx, I really need this for my project. thanks in advance

    Hi guys, trying to access the link but it cant be found right now <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

  • look earlier in the topic. I can't fix a quoted link.

  • look earlier in the topic. I can't fix a quoted link.

    Thank you, it's my first time to be here I'm trying to understand the file and how it works. At the moment there are multiple branches of the dashed lines while you swipe across the canvas. I'll try to see why is that from the thread.

  • It was made a long time ago and in the meantime there was a change in the event system that makes it not work.

    To fix change the "dash:spawn dash" action in event three to:

    system:create dash at dash.x, dash.y

    dash set angle towards mouse.x, mouse.y

  • Possible to get capx. Link is not working anymore

  • jatin1726, see Rojo's first comment in this post.

    Also, this may be easier to do with the Spline plugin:

    construct.net/forum/extending-construct-2/work-in-progress-addons-30/behavior-rex-spline-114539

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jatin1726, see Rojo's first comment in this post.

    Also, this may be easier to do with the Spline plugin:

    https://www.construct.net/forum/extending-construct-2/work-in-progress-addons-30/behavior-rex-spline-114539

    Problem with spline plugin is we have to set points before hand. We cannot draw line in realtime.

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