lukezero's Forum Posts

  • You do not have permission to view this post

  • I would try using the Evaluate expression condition.

    In the value of the condition you can do something like:

    > (your_variable > min_value) & (your_variable < max_value)
    

    That translates to your_variable GREATER THAN min_value AND your_variable LOWER THAN max_value. If that that is true then your_variable is within that range.

    If you want to test for different ranges you would have different condition and do different actions for each condition.

    Thanks, dude! Where is this expression in Construct 2?

  • Hi guys!

    I'm a game designer with some knowledge of programming logic, but every now and then I come up against my limitations.

    I'm trying to implement a condition that considers three ranges of values ​​of the same variable, to express something visually in the game, but still without success. I've tried the expressions "Compare two value", "Is between values" and even analyzing each state of the variable individually. But also without success.

    What is the best way to do this?

    Thank you once again for your attention and collaboration!

    Tagged:

  • Hi guys!

    I'm making a 2D platform game and one of the stages has a river at the bottom that reflects the top of the screen (platform + background).

    Example below:

    What's the best way to create this effect?

    Can the ripple effect of the water be applied to it as well?

    Thank you all in advance! :)

  • You do not have permission to view this post

  • Hi, this might help you construct.net/en/make-games/addons/1233/reflecting-water

    Thanks! In truth, I'm looking for a solution for C2. ^^

  • Hi guys!

    I'm making a 2D platform game and one of the stages has a river at the bottom that reflects the top of the screen (platform + background).

    Example below:

    What's the best way to create this effect?

    Can the ripple effect of the water be applied to it as well?

    Thank you all in advance! :)

  • Hi pals!

    I'm developing a 2D platform game and I want to establish a good and challenging AI. I've been using "Compare X" to implement basic AI behaviors in enemies, but I'm having difficulty because C2's Line of Sight is very flawed.

    I thank you in advance for your attention and collaboration!

  • You do not have permission to view this post

  • Here you have it: fileport.io/3eErBLhXX4zW

    Thank you very much! :D

  • Hi guys!

    I spent a lot of time here trying to make a good amount of fireflies with a similar behavior to the animated GIF below using particles, but I didn't get anything close to that.

    Do you have any suggestions? Examples in CAPX?

    Thanks in advance!

  • Hi guys!

    I spent a lot of time here trying to make a good amount of fireflies with a similar behavior to the animated GIF below using particles, but I didn't get anything close to that.

    Do you have any suggestions? Examples in CAPX?

    Thanks in advance!

    Tagged:

  • Supposing that you have an "HUD" layer with parallax 0% where you want to position your coins after you collect them; the problem is that in your code you keep your coin in the same layer and you treat the hud coordinates the same way as the world coordinates.

    What i mean is that you may have your coin at position x:2000, y:2000 in your game world. If you simply move it to x:50 y:50, you're still moving the coin in the game world.

    So, what you need to do is move the coin to the HUD layer and set its position to the position the coin would have if it was on that layer to begin with. Basically you need to translate the coin coordinates from the "Game" layer to the "HUD" layer.

    Here's a revised version of the code:

    Note that Construct has specific expressions to make the translation easier:

    CanvasToLayerX(layer, x, y)

    CanvasToLayerY(layer, x, y)

    LayerToCanvasX(layer, x, y)

    LayerToCanvasY(layer, x, y)

    Thanks a lot, dude! It worked very well! :D

  • Hi guys!

    I'm developing a platform game where collectible coins automatically go to the HUD in the top left of the screen when the character collects them in the stages, as in the image below:

    Since I couldn't do it using the bullet and Line of Sight behavior (!!!), I resorted to Lerp and/or Position to do it successfully.

    However, since the game's coins and the HUD are on different layers, the last coins collected are always shifted several pixels forward when they are collected, causing a strange effect.

    I tried to solve it using Viewport expressions and creating two variables (TargetX and TargetY), but I was unsuccessful (see image below).

    Does anyone have any suggestions on how to solve this in C2?

    Thank you in advance!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post