dop2000's Forum Posts

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

  • Have you read the comment above from zenox98??

    It's exactly the problem he described.

    You need to fix origin image points for all your sprites, all animations and all frames.

  • No, you would not need a separate sprite for each weapon. You can only have 2 sprites - WeaponShop and WeaponEquipped. Each sprite will have many animations - for example WeaponShop will have "SS1", "SS2", "LS1" etc (see my screenshot above).

    Also, create an instance variable "weapon_code" on these sprites. You can create other instance variables, for example "weapon_price".

    So when you add weapons to your shop, you can pick several weapon codes from the CSV. (on random, or all available for this level or using some other criteria).

    For each weapon code you create an instance of your sprite and assign WeaponShop.weapon_code=(code from CSV), WeaponShop.weapon_price=(price from CSV). And set animation, also retrieved from CSV.

    Now you have a bunch of WeaponShop sprite instances which you can display in the shop.

    When player clicks (or overlaps) any of them, you can easily get weapon code and price from sprite instance variables. And if needed, you can retrieve other data from the CSV.

    You can do all this with only a dozen or so events and sell hundreds of weapons in your shops

  • Ok, second attempt.

    http://doptrix.com/C2/BouncingParticles3/

    capx