sirkame's Forum Posts

  • Yes, I tried. The problem is that the object is created depending on the window width, not in the project resolution width. So for some reason, I create an object on window.width/2 and as my window is bigger (yes, it sounds veeeeery weird) the object actually shows on the right side of the screen. It's crazy.

  • Hi!

    I'm trying to create a HUD in the upper side of the screen with 3 different objects on it. Imagine: health, combo and coins.

    The thing is, if I create the object in a specific X or Y it goes away when changing the resolution. I tried to create them with this but doesn't work:

    Create object "health" at: window.width/2 (middle one)

    Create object "combo" at: window.width/2-(window.width/3) (left one)

    But when It shows completely off because window.width takes the browser window and not the window size I wrote in the layout options. I tried every single full screen mode and nothing.

    So: the object is created based on window width (1920 because of my monitor resolution) but the game is 720p.

  • Hi friends,

    My problem is simple but I can't get rid of it. I stack a pile of boxes (perfectly square) that are in "bounding box" collision mode. I stack them one above another and they start like... shaking a little bit. If I play with density all I get is more of that effect. Is it impossible to stack them perfectly?

    Also, there's 1 pixel (transparent) between the boxes but I double-checked the sprite and the pixel line is not there. Any ideas?

    Thank you as always.

  • Hi friends,

    I have a ball that doesn't want to stop. It's like the friction is not enough and only 0 to 1 values are available, so I don't know what to do.

    I made a code to slow it down but it's so cheap and not always effective. Am I missing something?

    I'm trying to change the density and raising the world gravity, but it still goes on and on.

    Thanks!

  • Thank you soooooooooo much. Works like a charm.

  • Hi again friends,

    I got a golf game where the power of the shot is equal to the distance between the mouse position and the ball position (with limitations, obviously).

    Now, the bar, for example, can be 300px long but I want to show a number with the percentage of the power.

    I'm horrible at maths xD

  • Easy =)

    Conditions:

    System: For each BLOCK

    Player: is overlapping BLOCK at offset 0,1

    Action:

    BLOCK: Set Animation Frame to 1

    BLOCK: Set Solid on (this allows the character to step over the blocks, but if there's an enemy following you, he'll fall)

    Now, to recover the state of a single block, it's just the same:

    Conditions:

    System: For each BLOCK

    Player: is overlapping BLOCK at offset 0,1 (INVERT)

    Action:

    BLOCK: Set Animation Frame to 0

    BLOCK: Set Solid off

    Now I'm trying to do the same with a full animation. I'll be back

    EDIT: Done!

    If you want to use animation looping. First of all, of course, make the animation and set it on loop. Then, just change the action "animation frame" for "Start animation from beginning" in the NOT overlapping action line.

  • I solved it easily. I was making a silly mistake. Just in case someone find it useful:

  • Hello!

    New question. I'm trying to make something like a bridge made of blocks (cloned from one object) and I want to change their animation or frame when he's on them and go back to normal when he steps away. I managed to make the effect I want but I don't know how to deactivate in one block only :S

    How could I make blocks to turn on and off independently?

    Thank you in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's exactly what I want. I'm looking for a way to include it in my game. Thank you VERY much.

  • Hi friends,

    I made an enemy which has life as an instance variable. In this specific case: 2 hits.

    So when something hits the enemy, it's life goes down by one and, when life = 0, it dies.

    Now, if I spawn two of them, only one seems to handle the instance. Could someone show me how to do this correctly?

    And how to make a different lifebar for each instance of enemy, if that's possible.

    Thank you very much.

  • For some reason, it doesn't work. I'm thinking on multi-layering the ground so when the character moves along them, they change their Z position... It's a little bit too complicated but I can't find another way.

  • Hi friends,

    I'm trying to make the character come to the front by using layers and/or Z layering, but I got a problem.

    I got my main character and several enemies, but they're all the same. Same object, just copied several times, in order to preserve the AI.

    Now, my code says that when player.y is above or below enemy.y it changes it's position, coming to a front position or behind it.

    But this only works with one of the enemies: the first one created (so, the first instance).

    Do I have to make different objects for each enemy, even when they're all the same? Can't I clone them?