calebbennetts's Forum Posts

  • You can probably use the "for each" condition on the right events to make the different enemies act independently. As far as conserving memory, I don't know what specific changes you can make, but the picking conditions (pick by evaluate, pick highest/lowest, etc.) can probably help.

  • That's really fun.

  • There's a system condition called "pick by evaluate." You can choose the object type you want to pick by clicking it in the window that pops up, then use an expression like "object.variable = 1"

  • Welcome aboard!

  • I put together this example file. (Google Drive treats capx files strangely. Just click the "download" button in the top right.)

    To keep the player from running after the first tap, I put the conditions for the first and second taps as subevents of an "on D pressed" condition, separated with an "else."

    I also noticed 0.05 seconds wasn't really enough time to double-tap. I barely managed to do it with the timer set to 0.25!

  • I don't have an example, but I will say that "set speed" can be done with "set vector x," but you will have to take care of directions explicitly, and the speed won't hold if you don't also adjust the max speed.

  • Oh, yeah, I think you're right, you would need to check on multiple sides. So it would be 4 computations, not 2. But I was referring to the "compare x" and "compare y" actions that all objects have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think "distance" uses the Pythagorean Theorem, so there would be squaring and square roots involved. I'm not 100% certain, but I think it would be lighter computation to do compare X and compare Y. That would allow for collisions between rectangular objects, whereas distance would treat everything as a circle.

  • That's actually super-easy if everything you stack is the same object type or the same family. There's a system action - "sort z order."

  • And check out the "8 Direction" behavior.

  • Did you set the layout's "event sheet" property to the right event sheet?

  • I think a more efficient way to do that would be to give both players the "scroll to" behavior and turn it on and off like you do with 8Direction. The advantage there is that you can add "Trigger once" to the conditions for Changeplayer=0 or Changeplayer=1, and the event won't have to run every tick. The difference is meaningless for a small game, but it can become important to avoid triggering events more often than necessary if performance becomes an issue.

  • That's a really good question.

    There's probably lots of ways to do it, but I played around and found 2 possibilities. You can download my capx here.

    Press "space" to run a cycle. The orange blocks use the sine behavior, and the blue ones use bullet. Neither method gets you the exact position you want, especially if the framerate varies, so both sets of blocks set their positions explicitly when a cycle ends.

    If I only had these 2 to choose between, I would probably go with sine. You might be able to play with the "period" settings and the duration of the timer to get motion closer to exactly what you want.

    P.S. Google drive is a little weird for capx files. When the screen comes up, just click the download button at the top.

  • I don't know why, but this thread struck me as somehow really funny.

  • The name can be anything that makes sense, and the initial value should be whatever you want the character's health to be at the start of the game.

    Man, I need to start using local storage for things...