dop2000's Forum Posts

  • Thanks korbaach, used your formula today in my game!

    BTW, the reverse formula for setting slider position to current volume is this:

    position = 10^(volume/20)

  • It should be working, maybe it's off by more than 2 pixels.

    Also I mixed up x and y in my previous comment.

    try

    Distance(sprite.x, sprite.y, 432, 49) <50

    If it works, try <20, then <10

    Or use MoveTo plugin.

  • X and Y coordinates almost always will be in fraction of a pixel, for example x=49.028388481, y=432.1493800217

    You should try something like this:

    System -> Compare two values -> Distance(sprite.x, sprite.y, 49, 432)<2

    Also, check the MoveTo plugin:

    It's easy to use (easier than custom movement) and I think it has "On reached destination" event.

  • you can do this:

  • Also, instead of searching for an empty slot, you can use Insert/Push/Pop actions to add/remove elements.

  • This should get you started:

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

  • Try setting the speed before you set the angle.

    If speed=0, then Bullet-Set Angle action is ignored.

  • Scrap my previous advice

    Replace your whole event with this:

    You probably don't need the array. Just set some instance variable on the dots that are already connected.

    And one last thing - StartLine function requires three parameters and you only passing two.

  • There is also a trick if you need to pick 2 dot instances and work with them independently in one event.

    Create a family and add your dot sprite to it.

    This will allow you to do things like this:

    On touched dot   <-this will pick one instance of dot
        Pick familyDot where <some criteria>   <-this will pick another instance of dot
        Line set width to distance(dot.x, dot.y, familyDot.x, familyDot.y)  <- draw line between two instances
    [/code:3o3pzqqj]
  • In your event #5 the system picks 1 dot (which is clicked). Inside this event you can't pick other dots.

    If you need to pick another dot, you should do it either in a function, or add event "System->Pick all dots" and nest your events #8 and #9 inside it.

    There are other errors in your game, but at least if you fix this your second line gets created.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nothing is wrong, it's the way time and distance work in our Universe

  • It's not that complicated. And, on second thought, it would be better and easier to use a timer.

    On click start -> change value, stop any running timers, start timer for 0.5s

    On timer event -> and if user still holding the button -> change value, restart the timer for a slightly shorter time.

  • Could you share your capx? It would be much easier to find the problem.

  • Have you tried running your project in Debug Mode (Ctrl-F4)?

    You'll be able to see what's going on - if the Line sprite gets created, which animation/frame playing and so on.

    If this doesn't help, try adding debug output. This could be a text objects somewhere on your layout. Make it big, set text wrapping=Character. Use Text->Append text to print some debug information to it. For example:

    MyDebug -> Append-> "ActiveDots:" & NumActiveDots

    or

    MyDebug -> Append-> "Line:" & Line.UID & " picked:" & Line.PickedCount

    Or you can use Browser->Log action for this.