Laurent's Forum Posts

  • 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.

  • Unfortunately can't open the link you are referring to.

    The file has been created with the last version of the beta

  • Anyone ?

  • I'd like to make a function that allows the user to draw a path from a sprite for the sprite to follow it.

    Long ago, I found a .capx that does almost that. I tried to modify it but could make it work only when I draw the line from the front of the sprite.

    See for yourself, capx is included in the link. Hope you'll be able to make it work right

    Thanks !

    Laurent

    https://www.dropbox.com/s/kenyke42fe51w ... .capx?dl=0

  • Lovely ! Thanks, Asmodean, that's exactly what I was looking for.

    Instead of using variables, I reset scale to 1 after transformation has been applied

  • Hello

    I made a project where I created a routine to automatically scale and correctly reposition objects pined on another one when it is moved and scale.

    Everything is ok except for the scale routine. On the included caps, use the two big ovales as buttons to scale up and down the ascending/descending group. You'll see that when you press scale up and then scale down, ther first 2/3 times you press scale down, the group still scales up. The same when you first scale down then scale up.

    Any idea of the reason why it doesn't work as it should ?

    https://www.dropbox.com/s/w6jcqmrt51dwo ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm working on an app to locate user position on a mobile device.

    It perfectly works when I use Watch position to calculate location coordinates. The dot representing the user position updates regularly to the new position.

    But when I replace Watch position for Request position, when I click button to request position, it works once, but never updates when I click the button again.

    Any idea about what may going on ?

    I've tried many options but none seem to work

  • Hi there

    I'm using an embeded Construct 2 module into a page to process various information. This process gives me a result that I want to send to the host page to perform actions.

    How can I send this command to the page using javascript ? This command should be something like "print text", "play video", go to page"

    Thanks in advance

  • Any idea ?

  • Hi there !

    I plan to make a tool for ornithologist to help them :

    • know what birds can be spotted at a given time of year
    • tell when to spot a given bird

    I've an excel file made like this :

    ...............................jan.......fev.......march........apr.......may ....

    Sparrow.................0...........0............0...............0...........1 ....

    Robin......................1...........2...........3................2...........1 ....

    Mocking bird..........0...........0...........2.................0..........1 ....

    Numbers tell how frequent the birds are to be seen a given month :

    0 : bird absent

    1 : few birds

    2 : common

    3 : many !

    the list is about 200 birds and I want

    • only the spotable birds being displayed when time is chosen

    ex :

    month : march

    Robins : many !

    Mocking Bird : common

    • only months when a given bird is then spotable

    ex :

    I want to spot Sparrows

    Come in May !

    Created list from sorting the ecxel file could be long so user may need to be able to scroll down the screen.

    any ideas how to achieve that ?

    thanks !

    Laurent

  • RamPackWobble : yeah, came up with the same conclusion but couldn't achieve sth so far. Tried to divide speed with time to get a proportional spawn rate but doesn't work.