dop2000's Forum Posts

  • Physics will definitely be an overkill here.

    As Bitsix advised, place origin image point at the start of the chain and use any of these behaviors to rotate it - Sine, Rotate, RotateTo, LiteTween.

    The ball can be in the same sprite with the chain, or you can make it a separate sprite pinned to the other end of the chain.

  • But if you set objects Opacity to 0, the engine will still render this object on the screen but invisible.

    Second thing, objects outside the visible screen as I remember, are automatically not rendered by the engine.

    It probably depends on the platform, browser or WebGL version.

    Try setting Text object opacity to 0 and then changing its text - TextWidth and TextHeight properties are not updated, because the text is not actually rendered. If you set opacity to 0.01, it starts rendering.

    Off-screen objects are not rendered, but they still consume CPU resources if they have active animations, behaviors, or they are part of different events, collision checks etc.

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

  • Try Construct 3

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

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