kriand's Recent Forum Activity

  • It's because you created sprites instead of tilemaps. After starting the layout they play the animation and what you see is the last frame.

  • Hey MrTholl

    The Persistent behavior is not a suitable behavior for the player. Delete this one and, in case, disable the 'Global' property. Create a global object like an array or a dictinary to store persistent player stats. You dont need to fill out the array/dictionaray directly. It is enough to give it some instance variables and work with them:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i was making a small pong with balls(planets) circulating around the sun and just wanted them to ..circulate .

    yes. thats what i did. your solution is a good one too. if it works like you expected it to work its fine.

  • 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.

  • 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:

kriand's avatar

kriand

Early Adopter

Member since 28 Mar, 2017

Twitter
kriand has 2 followers

Trophy Case

  • 7-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

9/44
How to earn trophies