Superxonic's Forum Posts

  • Is overlaping does not loop nor trigger actions. It test for overlap with another object like the description say. And returns true or false.

    Is there a case where if overlap condition is met, the event actions don't loop?

    Here's some examples, In this case Is overlapping is allways true because the layout starts with the two sprites already overlaping:

    1- Only run actions one time On start of layout

    2- Only run actions one time every second passes

    3- The sprite doesn't have animations so action will never run.

    4- Will trigger once.

    5- Only run actions when sprite2 is created and also overlapping. Only once.

    6- This event will call a function that will run once every time a blue sprite is destroyed on screen.

    "Object: Select the object to test for overlap, while true, the event's actions are looped."

    That's only applicable to your case, in the examples it will not "loop" the actions even tho is allways overlapping. So that will be a wrong description.

  • Actions will run when all the conditions in the event block are true (if it's an AND event). << This is the most important part of this.

    You only have 1 condition in your block checking every tick

    Is overlaping is a condition, it will return true when the condition is met.

    So it does a collision check whenever you tell it to do it (every tick in your case).

    If it's overlapping every tick then the event will run the actions (because this is the only condition).

    If it's not overlapping it will keep checking of course and returning false so the event will not run the actions (conditions are not met).

    Is overlapping can't specify "every tick" in the description, that's only true in your case not in all cases.

    It can't say "will run actions" because conditions don't run actions, the event run actions when all conditions in the block are true.

    I understand that it's frustrating and the grenade example is funny, but the description is not an instruction, the grenade description should say something like "exploding device" and you choose how to make it explode. Just keep in mind that the conditions are not a single use scenario. They can't define 1 use in the description when it can be used in potentially a hundred different ways.

  • I don't know if this is the same problem you are having. But something similar happened to me and it was a missing addon/wrong addon version.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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