dop2000's Forum Posts

  • If you just need to draw lines and nothing else, you can do this without the canvas.

    Use a Tiled Background object (say, 2x2 pixels), stretch it and rotate.

    For example:

    on first click - create TiledBackground at (mouse.x, mouse.y)

    on second click - set TiledBackground width to distance (self.x, self.y, mouse.x, mouse.y),

    set angle towards (mouse.x, mouse.y)

  • Physics should not be used together with non-physics behaviors like Solid or Car.

    You need to remove those behaviors and move your cars using physics actions (like Apply force or impulse).

  • Create a family with this sprite.

    You will be able to pick to one sprite instance and one family instance in the same event and then create a physics joint between them.

  • Add an invisible tilemap.

    Set Obstacles:Custom and add tilemap as an obstacle for pathfinding.

    Set tiles where the white and red space is on your screenshots.

    I made something similar for another post:

    For situations when you click on the white space, you should use "Path: Pick nearest to Touch.X, Touch.Y" and then find path to that picked Path sprite.

    Also, see this addon:

  • Collision checks will not work here. You need to check tile at hero position:

    On every tick

    Compare tile at PositionToTileX(Hero.x) , PositionToTileY(Hero.y)

  • You do not have permission to view this post

  • There is a capx is in that link I posted above.

    But you'll need to experiment with effects and blend modes to make it work like on your screenshot.

    If you don't need this cone of light to be blocked by obstacles (walls, trees), then you can remove the ShadowLight object and it all can be done much easier:

    create a new layer, set black color, opacity=60, transparent=no.

    create a white sprite (triangle) on this layer.

    apply an effect to the layer, for example Multiply.

  • You do not have permission to view this post

  • Don't shout at me

    That's not a "simple shadow". There is a shadow light with "destination out" blend mode used as a mask for a cone sprite, to create a field of view.

    You can use the same principle. Just instead of the "destination out" blend mode use some other blend mode and/or effect.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, see this post:

  • You can do continuous preview:

    https://www.scirra.com/tutorials/529/ho ... us-preview

  • Pathfinding using a tilemap might be a good idea if your enemy doesn't have platform behavior. (say, if it's flying above the ground and you move it using Bullet or MoveTo)

    With platform behavior you'll have to find the path first, and then move the enemy from one node to another, simulating platform controls - either left, right or jump. You'll also need to make sure that your enemy can jump across gaps, obstacles etc.

  • You are trying to load game from a string that contains the file name. This obviously doesn't work.

    You need to read the file and load game from the file content (JSON-string):

    Load game from JSON string:

    NWjs.ReadFile(NWjs.AppFolder&"Mapas\"&Array.At(0))

  • That was the most obvious problem with your events, but there may be other mistakes.

    Could you post your capx? It's hard to understand what's going on in that screenshot.