Superxonic's Forum Posts

  • I did some testing, puting the "is visible" after the for each uses less resources than not having the "is visible" or having it before the for each.

    But ROJO's solution uses less cpu and has way less peaks than all the above.

  • Hi. Doesn´t work with more than 1 tile because you are using the NPC position as a reference and that is different every time the player collision with the MOVEMENT sprite. In this example I'm storing the initial position in a variable, the moves in another variable and using both to calculate how much the NPC should move.

    And then resetting when the NPC stops, including the turn so the NPC can move again.

    Take a look at it, probably not exactly what you need but It might give you some ideas. Cheers.

    drive.google.com/file/d/1PhrLk4M9-KqwvIWTHYFbWwwW86oNS46g/view

  • https://drive.google.com/file/d/14LSazQCyuVtHWaIg6bI0pArboNY4vNIh/view?usp=sharing

    You were changing the position of the red square before changing the frame, so it positioned to the image point of the first frame. The second time you press the button the frame has already changed so the red square goes to the bottom.

    I dont think this is going to help you with your initial problem tho. That one is too much for me. But maybe will help to check if you are referencing something in your events that didnt happen yet.

  • 1- Gets a check every tick. "Triggers" every tick. You can just put "8 directions is enabled" and it will be the same thing.

    2- Gets a check every tick. But only triggers when a condition is met: every 0.3 seconds.

    3- Gets a check every tick. But only triggers when the condition is met.

    4- Black event/no condition: "Triggers" every tick.

    Keep in mind that "on trigger" events also gets checked every tick.

    If you have "on collision" for 100 object that means 100 collision checks every tick EVEN IF THEY ARE NOT COLLIDING. And the actions that follow will trigger once when there is a collision.

    This was a problem for me in a game with hundred thousand+ entities (enemies,bullets) where i was wasting millions of unnecessary collision checks in things that didn't have a chance of ever colliding and for things that didn't even exist yet haha.

    TLDR: The entire code gets check every tick, or at least the first event in nested events situations.

    That's the way I understand it from the test I performed, If I'm wrong please let me know.

  • Did you try clamping it?

  • You can add a variable to the sprite and do this:

    Just make sure the animation in the sprite editor is set to speed 0

    EDIT: didn't realize your question is in construct2. My example is in construct3, I don't know if it will be the same.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can tick the option "copy picked" in the function options, so the objects picked before you call the function will pass to the function. If that's what you mean by "imput objects".

  • The 8direction behaviour tip it's just so they dont go through walls. Seems to work fine on my side.

    Subscribe to Construct videos now
  • True. Try adding the 8direction behavior to the enemy sprite. They can't go through walls with that.

  • What about this?:

  • Gameplay (i dont know why it didnt work in the original message):

    Subscribe to Construct videos now
  • Hello! I'm working on a "physics base action roguelike" where you fight robots using the power of going as fast as you can.

    Here is some gameplay:

    You can try it in the construct arcade:

    https://www.construct.net/en/free-online-games/operation-whipback-74489/play?via=mn

    I'm mostly focusing on making the combat feel satisfying. Its very much a work in progress but the main mechanic of bumping into the enemies to do damage is there.

    Any feedback is greatly appreciated. It's really hard to figure out if the game is too easy, too hard, hard to understand, or even frustrating when I know how it works and i've tested it like a 1000 times haha.

  • Hello,

    When I do

    "System -> compare two values -> SwordStuck>10

    System pick Sword instance number 0: Sword destroy"

    When the eleventh sword is spawned, all the previous sword are deleted instead of juste one. And it now become impossible to even stuck 1 sword anymore, they get inst deleted

    Maybe you need to substract 1 from the variable SwordStuck in the same event. Otherwise if the variable Its at eleven or more it will continue destroying all the swords.

  • Sorry to hear that. I uploaded a new version of my game to test this, also standard html export. It works fine in my case. I have r424.2 stable.

  • I'm trying other things, everything just "works". And the fun thing, there is no parent/child now.