phlp's Forum Posts

  • Basically, what dop2000 said. Fortunately, the Date object provides some useful expressions for this:

    1. Get the last reset timestamp
    2. Check if the difference between current timestamp and last reset is greater than 7 days. If it is:
      1. Do the reset
      2. Set another variable to a copy of the current timestamp, call it monday
      3. Set monday to Date.ChangeDay(monday, 1)
      4. Set monday to Date.ChangeHours(monday, 0)
      5. Set monday to Date.ChangeMinutes(monday, 0)
      6. Set monday to Date.ChangeSeconds(monday, 0)
      7. Set monday to Date.ChangeMilliseconds(monday, 0)
      8. If the current day is 0, subtract 1 week
      9. Save this as your new last reset

    Let us know if that works.

    • Post link icon

    Have you tried using the Bullet behavior with "Set angle" disabled?

  • Is that not the same thing?

    I thought "over time" meant gradually, so a value of 10 would mean rotating some amount between -10 and 10 degrees either per second or per lifetime of the particle. Obviously this can be done using objects, it's just the description that was unclear to me.

    Thanks Ashley for explaining all this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could add a second object with the same sprite as the player, placing it relative to the second portal whenever the player is overlapping the first portal. Then use a blend effect (probably "source in" with another sprite for the inside of the second portal) to cut off everything not inside the portal.

    This method would not use the drawing canvas but would have the desired effect.

  • You can already do this with the object spawning mode, and adding every spawned object as a child of the emitter. Here's an example.

    Playing with this example, I noticed some things that seem strange to me.

    • When using an object (ParticleSprite) and "Continuous spray", the angle of the particle is set to the angle of motion. Without an object, the particles are drawn with an angle of 0.
    • With "One-shot" and an object, the angle is randomized and, again, without an object they are all 0.
    • When using the sprite as an object and "One-shot", if the initial size is randomized and the grow rate is negative, the particles will flip to a negative size and continue to grow. This does not seem to happen if not using an object or for "Continuous spray".
    • None of the above is visible during the editor preview.
    • "Angle randomiser" claims to apply a deflection over time, but it adds a random angle every tick.

    Are these the intended behaviors?

  • If in event sheets, you'll have to declare and pass a local variable to a JS action. Let's say it's a string called num:

    let num = localVars.num;
    let string = "";
    for (let i = 1; i <= num.length; i++) {
    	string = num[num.length - i] + string;
    	if (i < num.length && ! (i % 3)) string = " " + string;
    };
    localVars.num = string;
    

    Then set your text to num. If it's not already a string, you'll have to convert it first.

    Basically, copy the string (number) starting from the last digit and adding a space every 3rd digit, unless it's the final (first) digit.

  • Have you tried working with the .json files?

  • I think the problem is that you're calling all these things every tick that the condition is met. It would be better to use a Tween back. If Durability_Time \leq 0 and no tweens are running, then disable platform, start Tween for position and scale, set animation, etc.

  • That's why you need to write a random number generator and pass both the same seed. That way, you don't need to keep track of each particle. If you create two instances of a particle system with the same RNG and the same seed, they will draw the exact same particles.

    I don't think there's any way to set the seed in Construct or in JS. Fortunately, your RNG can be pretty simple, since it's just for visual effects.

  • I think the best way will be to roll your own particle system with a simple RNG and pass both the same seed. That sounds more difficult than it actually is.

    Here is a related open feature request you should thumbs-up: github.com/Scirra/Construct-feature-requests/issues/533

  • What happens if you use both, but in opposite directions?

    You could try separating this process into steps. Define an input "vector" (really a number from -1 to 1). Initialize the vector every step to 0. If keyboard left down, subtract 1 from the vector. If D-pad left down, subtract 1. If keyboard right, add. If D-pad right, add. Then normalize the vector (set to -1 if less than -1, 1 if greater than 1).

    Handle animation and movement next, based on the value of your input vector.

  • Your event is picking all enemies and all hitboxes simultaneously. You could parent the enemies to their hitboxes:

    construct.net/en/make-games/manuals/construct-3/interface/layout-view

    or you could use the pin behavior:

    construct.net/en/make-games/manuals/construct-3/behavior-reference/pin

  • You can already create folders. Right click on the folder, say Object types, and click Add subfolder.

  • You could convert each to a string and concatenate them, then convert back in the Set value action: int( str(Variable_A) & str(Variable B) & ... ).