kriand's Forum Posts

  • I'm not sure why it's working on your code but in mine it's not, if I change it, they all freeze at the same time when the game starts.

    You said something similar in another post and that the rest of your code can not cause a problem. It seems that this is not the case. Please go through your code carefully or post share your project.

  • Hey yotzer

    i am not a math expert but maybe for your project the sine behavior is enough. Give your sprite two sine behaviors, one horizontal and one vertical:

    Make sure that the 'Period' of both are the same. The 'Period offset' of one sine needs to be 0.25 * 'Period'. Magnitude can differ to achieve an ellipse. All these values can be stored in variables and changed in events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey grossd

    Since loops are usually done in a tick (as long as no 'wait' is used), the next parent event under the loop can be used as if your listbox is already filled. But without seeing your code, it's difficult to tell if another method is needed.

    Maybe this is an option:

  • I have mistaken 'IsPlaying' for 'Animation is playing' and not 'game is running'.

    I can not say for sure what causes the bug but be aware that you can click/touch invisible objects and buttons to trigger something.

    Try not to update text every tick because that costs performance. This may not be relevant in a small game like this, but in future projects try to update text every time a value changes.

    Here is how i did it:

    File: 1drv.ms/u/s!Ap_-qxoGKbDcg2Xd8N753RrXMJbw

  • Hey mr inkoqnito

    never use wait like this. It only causes bugs. Also a global boolean is not necessary. Better use a instance variable. For the countdown use the timer behavior or do it like this:

  • Hey recksbayne

    you can combine pathfind with 8direction to move your partymember. I added this to your project:

    1drv.ms/u/s!Ap_-qxoGKbDcg2T17iRzUFP2qMeA

    Also you can take a look on an older example i made to test it myself. You need to open it in C3 ( editor.construct.net ) but the code is compatible with C2:

    1drv.ms/u/s!Ap_-qxoGKbDcg2OZR-V2m3DXqEMT

    Keep in mind that a good KI and NPC movement needs more than a handful of lines. It needs some extra work to prevent glitches and bugs.

  • Your solution is really not the best. Imagine there is only one enemy left. He would stop every second. "Repeat Sprite.Counts times" and then "Pick random instance" does not really make sense either. It could affect one enemy several times and others not at all.

    My example did not contain the complete code to set the sprites in motion, it should only explain the principle. Of course you have to adapt it to your project.

    Here again an example with everything that is necessary. Make sure that the conditions 'is moving' and 'is on floor' are really true. Disable one of the two if nothing happens.

    1drv.ms/u/s!Ap_-qxoGKbDcg2IaHe7qBjaltMzA

    Once again, it shows the principle. Adapt it to your project!

  • You forgot to delete the Physic behavior of the single sprites since the family already has this behavior.

  • I made this because of your other conditions 'is on floor/is moving', in order to keep the timer running. Here is another way of doing so:

  • If you were to implement my suggestion, you would realize that it now works for each object.

    1drv.ms/u/s!Ap_-qxoGKbDcg2GaK0_1xNIMyOhd

  • Hey Alon

    maybe this can help you:

  • You do not have permission to view this post

  • zumwaltwood

    Reboot the layout or load a savegame are normal operations when the player dies. If you only reset the player, you would not only have to reset the coins, but also the enemies and all other stuff that have changed. An unnecessary effort. He would have to have very specific requirements for his game, so that a layout restart/savegame is unsuitable. But I suspect he is trying his first, simple platformer.

    xfairytale

    You can load the game demo 'Kiwi Story' on Construct 3 startpage. Here you can get some inspiration.

  • The question is, what happens after the player dies? When the layout is restarted, all coins are back automatically. If you have previously created a save state and this loads, the coins are also back automatically.

  • It is not clear whether you are using the 'Shake' action from the ScrollTo behavior or you use your own creation.

    You dont need to enlarge the layout. Just enable the 'Unbounded scrolling' option in Layout properties. To change the color of the exterior, disable 'Transparent' of your lowest Layer and change its color. Or you enlarge your background image.