dop2000's Forum Posts

  • We can't possibly guess what's wrong with your game. Please post screenshots of your events or share your project file. Check out this post:

    construct.net/en/forum/construct-3/how-do-i-8/best-help-tips-forum-139528

  • You can't use Pin with Physics. If you need Physics, then create a physics joint. There is a template in C3 showing how to do it.

    And dragging Physics objects with DragAndDrop behavior is also not recommended. It may work, but will cause problems, especially when joints are involved.

    If you don't need Physics, then you can use Pin, but remove that condition "is dragging" from your event.

  • Pin behavior is the easiest way to do it. Search for "Pin" in C3 templates.

  • Or create a hierarchy connection between the Enemy and EnemyLife object in the layout editor. Then when you create a new Enemy, tick "Create hierarchy" checkbox, and the EnemyLife will be automatically pinned to the enemy.

  • Well, the best solution is to add enemy and gun sprites into a container.

    Without the container you will need two separate events - Bullet on collision with Enemy, and Bullet on collision with Gun. And in the second event you will need to pick the Enemy instance which the gun belongs to.

  • If you need to stop both child and parent loops, add two "Stop loop" actions.

  • Is enemy gun sprite added to the same container with the enemy sprite? If not, this would explain why all enemy instances are picked when bullet collides with a gun.

  • Who knows, maybe there was some glitch with saving the project. Make sure to create backup copies, or configure automatic backup in C3 settings.

  • Most people use this tool to make spritefonts:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    It will generate spacing data for you.

    Even if you prefer the spritefont you made yourself, you can try recreating the same font with that tool and compare the spacing data string to see where you made a mistake.

  • That's a dictionary. Add a new Dictionary object and rename it to StorageData or some similar name.

  • Like I said, TileToPositionX() expression requires tile number. It won't work if you use Sprite.x as a parameter.

    You can do this:

    TileToPositionX(int((Sprite.X-Tilemap.X)/16))

    but it will be the same as SnapX(Sprite.x)

    .

    If you need to get tile number (or index) for a given position, use PositionToTile expressions.

  • Is there any alternate way to be able to preserve the saves if user choose to ?

    In NWJS export you can save game to a disk file. But if you need a cross-platform solution, then I think the only way is to use some cloud service like Playfab or Firebase.

    I am currently using the save/load feature which is working fine, except that I am unable to clear or include a new save.

    It's not possible to delete a saved slot. What you can do is use it in combination with Local Storage. Save a flag in Local Storage - "GameIsSaved=Yes/No". On start of your game load this flag, and if it's "No", then simply ignore the saved slot, don't load it.

    Also I realized that if I publish new version of game with a different name for the save

    Why do you change the save slot name? Unless you've made significant changes to the project, the old saved state should be compatible. With Local Storage you should also use the same key names when publishing a new version.

  • TileToPosition expression takes tile number as parameter, not a layout coordinate. You probably need SnapX/SnapY expression here instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It may be a long and difficult process, but I would try to find a pattern to these freezes, or a reliable way to reproduce them. After that you can start investigating into what may be causing them and how to fix them.

    Try running the game on an old slow PC or in debug mode, see if it makes the issue worse.

  • For storing a few values definitely go with Local Storage, it works on any platform. I have a simple example:

    howtoconstructdemos.com/easily-save-multiple-values-in-local-storage

    Note, that it's local, which means that the save will be lost if players uninstall your game or clear browser data in a browser version.