dop2000's Forum Posts

  • I don't know.. Could be a problem with your gamepad.

  • I'm not sure I understand your problem..

    Try this file:

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

    I tested it on two different gamepads - on both I can control the blue circle with the right stick.

  • For me the right Y axis worked at index 5.

    Try RawAxis(0,5)

  • I believe this is a bug, I reported it here:

    Filtered input doesn't work, but you should be able to use raw input.

  • Why so complicated? Remove Drag&Drop from Canvas, enable Drag&Drop on the Sprite.

    Pin each pair Canvas+Sprite together:

    On Start of Layout:

    For each Sprite

    ....Canvas overlapping Sprite: Canvas pin to Sprite

    That's it, you should now be able to drag & drop canvases.

  • You can save all arrays in one text file - one line per array.

    The arrays can be in JSON format or simply a list of values separated by comma or any other symbol.

    Use tokencount and tokenat expressions to parse the file, for example:

    tokenat(AJAX.lastdata, 0, newline) will give you the first line from the file.

    Or you can use CSV plugin:

  • Or pin your image to invisible draggable sprite.

    Or simple change the collision polygon on your sprite - make it smaller.

  • Physics angle of motion:

    angle(0, 0, Sprite.Physics.VelocityX, Sprite.Physics.VelocityY)

    To compare two angles you can use anglediff() expression.

  • Even if you are using lots of sprites, there are still ways to optimize them.

    First, read these tutorials:

    https://www.construct.net/au/blogs/cons ... memory-796

    https://www.scirra.com/manual/134/performance-tips

    https://www.construct.net/au/blogs/ashl ... -works-917

    Try to make images (in sprites) as small as possible. Don't create big sprites and then scale them down on the layout.

    Don't create sprites with many animations.

    If you only need pine trees on this layout, a sprite containing 20 different animations for all kinds of trees will consume a lot of memory.

    If you have huge layouts with thousands of background sprites, try to build a system where sprites are created as you progress through the level and destroyed when they are no longer needed.

    Or at least disable animations/events/behaviors for sprites that are off-screen.

    Avoid using effects and behaviors on too many sprites.

    Regarding the issue with the TargetScale - you can do something like this:

    Every 1 second:
    Tree compare instance variable TargetScale<1   -> Add 0.1 to TargetScale
                                                   -> Tree set scale to TargetScale[/code:vut6cbur]
    
    Trees that have reached scale 1 will no longer be picked by this event.
  • You didn't provide any information - what behaviors you are using? Is this Physics/Platform game? Are these objects Solid?

    If B should not collide with anything, you can simply disable collisions for this object.

    Otherwise you need to handle collisions with events - create events for different combinations:

    A on collision with C -> do this

    B on collision with C -> do that

    etc.

  • Your question is about C2, why are you posting in C3 forum?

    You can generate a big random number, save it to local storage and use it as a unique user ID.

  • You do not have permission to view this post

  • It's hard to tell what your are doing wrong without seeing your project.

    Please share your capx file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why do you need to protect save files like this?

    As a player I would be pissed if I couldn't load my old saves after replacing some hardware on my PC (say, motherboard or HDD).

  • YoHoho

    Of course you can change it for a bigger grid, just need to modify the values throughout the code - for example for 10x10 grid in event #2 change condition to newX<10, in event #4 change the formula to min(9, x+1) etc.

    Did you watch the video from the first comment? This algorithm is used for dungeon generation.