Laurent's Forum Posts

  • *deleted post*

  • Thanks

    But I'm afraid I'm not good enough with Construct to really understand your advices. If ever you sometime have the chance to look at the capx, it might tell you more about my needs.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi vitortaranto

    This thread is a bit old but maybe you can help me with this capx you posted years ago.

    It matches exactly my need except for two things:

    • When a path is drawn and the rocket moving, how can I prevent the user to draw another path before the first one is finished ?
    • How can I make it work on touch device ?

    Thanks for any help you can provide me with !

  • > Thanks

    > but how do I implement that ?

    >

    Sorry, I didn't look at your capx so not sure what you are doing exactly, but here's an example to explain what I mean and you can apply it to your situation.

    Let's say you want to create 10 sprites starting at coordinates 100, 100 and every 25px moving straight right (increasing X):

    ON whatever triggers

    -For startindex=0 endindex=9

    --create sprite at location x = 100 + 25*loopindex; y = 100

    This will create 10 sprites at x coordinates 100, 125, 150, 175, 200...

    Hi Badmood,

    thanks for the advice. Actually I'm trying to draw a path with the mouse spawning dots on a regular distance. Then, a sprite follows the path

  • Well, I managed to make it work on a computer but it despertly doesn't work on a touch device.

    Here is the capx : https://www.dropbox.com/s/kabhgy1qz9rtg ... .capx?dl=0

  • Thanks

    but how do I implement that ?

  • Hi there,

    I've been making a gesture path drawing for a sprite to follow. Everything works fine except for the path drawn with the mouse. I'd like to have dots to be spawn at a regular distance from one another.

    Anyone has an idea on how to do that ?

    Here the .capx I'm working on : https://www.dropbox.com/s/7befiup6yrfwx ... .capx?dl=0

  • Lovely. Thanks !

  • > AndreasR do you mean that with Intel XDK, app generated can't exceed 20 MB ?

    >

    No, I meant that the file size of the app will be about 20 mb. Surely if you add a lot of big images or sounds the file gets bigger.

    But the minimum size is about 20 mb.

    Thanks ! do you know if there's a maximum size to publish to iOs ?

  • AndreasR do you mean that with Intel XDK, app generated can't exceed 20 MB ?

  • Good example,

    How would you do to drag an entire layer instead of just a sprite ?

  • Interesting conversation.

    I agree with blymi, this is a situation I have to deal with all the time.

    Maybe a behavior could be created for layers, like "Intercept input", meaning actions could not pass through this layer and affect everything underneath (except what could be visible through transparent parts of the layer).

    And "Disable input and obstacles when layer is invisible", meaning input could not be registered on this layer when it is invisible as well as obstacles won't be taken in account by pathfinding and physics.

    What do you think ? Ashley, could it be implemented in a future beta ?

  • > Thanks, R0J0. I'll try to find a way to prevent the box to move continually

    >

    Can be done easily.

    Set initial speed of bullet sprite to 0.

    When mouse down - set speed to 200.

    When dot.count = 0 -> set bullet speed back to 0.

    Lovely !

    Thanks

  • Thanks, R0J0. I'll try to find a way to prevent the box to move continually

  • If that doesn't work then I think there was a change in C2 that caused it not to work. However there should be a fix in the topic it came from as I recall.

    Alternatively this also works:

    mouse: left button down
    --- create dot at (mouse.x, mouse.y)
    
    for each dot ordered by dot.zindex ascending
    --- sprite: set angle toward (dot.x, dot.y)
    	system: compare distance(sprite.x,sprite.y,dot.x,dot.y)<sprite.bullet.speed*dt
    	--- dot: destroy
    	else
    	--- stop loop[/code:2tuualvn]
    

    Thanks for the quick answer. But unfortunately, it doesnt seem to be working either.