dop2000's Forum Posts

  • JanMarc Press F12 in preview and open Browser Console, check if there are any errors when you are trying to load the file.

    If this doesn't help, you should probably create a post in "How do I.." forum.

  • If you have sprites with lots of animation frames, you can temporarily delete most frames, if you don't need them during the development. For example, if there is an animation with 100 frames, delete 99 of them. (of course, only do this if these frames will be easy to restore later)

    If you significantly reduce the number of images in the project, the preview will start much faster.

  • You can destroy an instance which plays a specific animation, just add a condition "Is playing".

    This code will destroy only the instance which was clicked:

    Mouse On Clicked Bob -> Bob Destroy
    

    This code will destroy the instance which was clicked, and only if it's playing "Tom" animation:

    Mouse On Clicked Bob
    Bob Is Playing "Tom" -> Bob Destroy
    
  • When DrawingCanvas.PixelScale is >1, there may be some data loss. Should be fixed now, please re-download the file.

  • You can get the object name using Family.ObjectNameName

    But if you need to run a behavior that is added to the object, and not to the family, you will need to pick the object instance. You can do this:

    Zombie Pick by unique ID = EnemiesFamily.UID
    .. Zobmie Restart Fade
    
    Vampire Pick by unique ID = EnemiesFamily.UID
    .. Vampire Enable Bullet
    
    etc.
    
  • It doesn't matter what I want, but you can upload both :)

  • I noticed this too. If you can reproduce this problem in a small test project, can you post a bug report?

    github.com/Scirra/Construct-3-bugs/issues

  • I have so many questions.

    Why? Why? Why? And finally - why?

  • A common way to do this is with Pathfinding behavior. Calculate the path to the player, then follow the path. Just make sure you are not doing this on every tick - use Timer behavior or an event like "Every N seconds"

  • There are no strict rules, every project is unique and you can organize event sheets any way you like. The main factor for me is convenience and ease of use. I don't enjoy working with giant event sheets with many hundreds or even thousands events. And I don't like when there are too many event sheets with just a couple of lines of code in each. Break the code into manageable blocks, use groups, make sure you include only the necessary sheets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add "Trigger once" as a second condition after "Variable=0".

    But the best method is to create the sprite in the event where you set the variable to 0.

  • You can set the layer (with menu buttons in Menu layout) as Global.

    Then in your Game layout add a layer with the same name. And you will have menu buttons in both layouts.

  • Yes, the snapshot size will be different, depending on the window size. You can use SnapshotWidth and SnapshotHeight expressions to convert from image to snapshot coordinates.

    I'm afraid on some screens SnapshotWidth and SnapshotHeight may be smaller than the image size, and you will lose some pixel information.

    So this may not be the most reliable method. I would use an array instead.

    .

    There are probably ways to read pixel data from image without the drawing canvas. See this comment:

    construct.net/en/forum/construct-2/how-do-i-18/simple-scorched-earth-worms-129595/page-2

  • If your character is moving horizontally only, then instead of "MoveTo On Arrived" event you can simply compare X-coordinate. If Character.X=targetX, then it has arrived.

    You can use Tween instead of MoveTo. Tween will change X coordinate, and Sine will change Y.

    Another solution is to use a separate invisible sprite for character, with MoveTo, but without the Sine - let's call it CharacterBase. And you will have to set your visible Character sprite position on every tick to CharacterBase + Sine offset.