dop2000's Forum Posts

  • (CanvasToLayerY("ruler", LayerToCanvasX("river",race_flag.X,race_flag.Y), LayerToCanvasY("river",race_flag.X,race_flag.Y))

    This expression is correct. It will convert flag Y-coordinate from layer "river" to layer "ruler". Make sure that the objects are on the right layers.

    If it still doesn't work, please post a screenshot of your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to convert touch coordinates to canvas snapshot coordinates:

    Set snapshotX to round((Touch.X-DrawingCanvas.BBoxLeft)/DrawingCanvas.PixelScale)

    Set snapshotY to round((Touch.Y-DrawingCanvas.BBoxTop)/DrawingCanvas.PixelScale)

    And then use these variables to get the colors.

  • It is possible if you combine all sprites to a family. Then you can use this condition to pick family member by name:

    System Pick EnemiesFamily By Evaluate: EnemiesFamily.objectTypeName="enemy"&number

    But if you are going to use a family, I suggest defining an instance variable "EnemyType" on the family to make picking easier.

    • Post link icon

    You should still be able to open the project in C3. But you need the entire project folder, not just the .caproj file

    Use "Open Project Folder" option in the menu.

  • One step I perform for every animation after import is 'crop transparent edges'. Can this be another flag in the settings .json?

    You can import all animations first, and then crop edges for all animations with a single click.

    DiegoM Is it possible to add a search of filter feature to the list of animations? I have sprites with hundreds of animations and it takes a lot of time to find anything there.

    Even a very simple implementation will be quite useful - like in Windows folders when you press letter "B" on keyboard, the focus jumps to the first file which name starts with "B".

  • AnD4D

    Compare Two Values: layerIndex("name")>=0

    :)

  • Copies of the same sprite are called instances in Construct. Events like "Mouse On Object Clicked" will pick the clicked instance. And any actions inside this event will only apply to the picked instance.

    In your project you need to move events 17-21 inside the event 16 (make them sub-events).

    Also, I suppose your couleur variable should be an instance variable on the Spot sprite. This way each instance of the Spot sprite will store its own couleur value

  • You need to set the correct scaling mode and maybe use Anchor behavior for UI objects. Check out this tutorial:

    construct.net/en/tutorials/supporting-multiple-screen-17

  • Like I said, you can't save to the same txt file in the project.

    A common solution is to save to Local Storage.

    When your app starts - first you check if there is a value in Local Storage. If there is, load it. If there isn't, load the default values from the txt.

  • Use this expression:

    Set myVariable to Browser.QueryParam("name")

  • You can't overwrite the txt file in the project.

    In html5 export you can prompt players to save a new file using "Browser Invoke Download" action. They will see standard "Save As" dialogue.

    In NWJS export you can use "Write File" action, this way you can save the file silently, without prompting the player.

    .

    Also, you need to replace "Wait 1s" with "Wait for previous action to complete" in your project.

  • I don't think it's possible without creating some kind of list of all family members - for example in an array.

    You can manually put all hair sprites on the layout (somewhere off-screen). And instead of creating/deleting them move them to the screen and back.

    Another option is to combine all hair animations into a single sprite.

  • It would help if you explain what you mean by "selection box"?

  • You need to add newline expression (or insert line breaks in your file) between each item. Or add each item one by one.