dop2000's Forum Posts

  • 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]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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

  • Are you using Particles object? If you only need 1 particle, why not use a sprite with bullet (plus maybe fade) behavior?

    As for the 1 second delay - it must be somewhere in your events.

  • Wait, why does the first line say "Time_Fonts -> Subtract from time_font"? It should be "System->Subtract from time_font".

    This means you have two time_font variables - one global variable and one instance variable on Time_Fonts object.

    Every 1 second you are changing the instance variable, but you set your text to the global variable (which doesn't change).

    You need to decide which one you want to use and delete the other one.

  • mekonbekon

    Pretty cool, I see you only using one particle instance, this should definitely decrease the CPU utilization. However there are a couple of small issues - if you leave the asteroid in the middle of the ship, particles are spraying from image point 1.

    Also, if asteroid is half-overlapping the ship, particles are spraying only from one side of it.

    Here is my version of continuous particles:

    DEMO

    CAPX

    I added some tweaks to decrease the number of particles instances.