0 Favourites

How do I make this work?

  • How do I make my game scale by adapting to each screen and resolution? The problem is that in my game there are objects that when they touch a barrier that is hidden beyond the layout, are destroyed, and a life is lost. But I have the barrier outside the layout so it takes about 3 seconds from leaving the screen until it collides and the life is discounted. Is there any way to make it as soon as it leaves the frame of the screen you lose a life and destroy the object?

    I also have problems with the loss of lives, I have brought the barrier in the window of sight to see when it crashed and destroyed the object but not lose a life. My event sheet is: sprite / on collision with "green" / subtract 1 from "life". And also I have a global variable "life: 3" assigned to a text box represented on the screen but what I say, no life is discounted ...

  • How do I make my game scale by adapting to each screen and resolution? The problem is that in my game there are objects that when they touch a barrier that is hidden beyond the layout, are destroyed, and a life is lost. But I have the barrier outside the layout so it takes about 3 seconds from leaving the screen until it collides and the life is discounted. Is there any way to make it as soon as it leaves the frame of the screen you lose a life and destroy the object?

    I also have problems with the loss of lives, I have brought the barrier in the window of sight to see when it crashed and destroyed the object but not lose a life. My event sheet is: sprite / on collision with "green" / subtract 1 from "life". And also I have a global variable "life: 3" assigned to a text box represented on the screen but what I say, no life is discounted ...

    In the behaviors you can set any sprite to be destroyed off the layout.Then you don't need your boundaries.

    You can also do that in an event by checking if a sprite is outside the layout and destroying it.

    You need to set your life text to the variable you use for life without quotation marks to see the lives number.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • > How do I make my game scale by adapting to each screen and resolution? The problem is that in my game there are objects that when they touch a barrier that is hidden beyond the layout, are destroyed, and a life is lost. But I have the barrier outside the layout so it takes about 3 seconds from leaving the screen until it collides and the life is discounted. Is there any way to make it as soon as it leaves the frame of the screen you lose a life and destroy the object?

    > I also have problems with the loss of lives, I have brought the barrier in the window of sight to see when it crashed and destroyed the object but not lose a life. My event sheet is: sprite / on collision with "green" / subtract 1 from "life". And also I have a global variable "life: 3" assigned to a text box represented on the screen but what I say, no life is discounted ...

    >

    In the behaviors you can set any sprite to be destroyed off the layout.Then you don't need your boundaries.

    You can also do that in an event by checking if a sprite is outside the layout and destroying it.

    You need to set your life text to the variable you use for life without quotation marks to see the lives number.

    done. but now those objects are now spawning...

  • Sprite > is on screen (invert the condition by right clicking on it)

    ________Sprite > destroy

  • Sprite > is on screen (invert the condition by right clicking on it)

    ________Sprite > destroy

    still not spawning

  • add instance var of 0 by default

    sprite is on screen

    trigger once

    > set instance var to 1

    is not on screen

    and var = 1

    sprite destroy

    if somebody offers a better way then do that, because i think even if you include the "trigger once" condition it's still going to be constantly setting the var to 1.

  • I would need to see your capx to tell what you have going on.

    Hard to trouble shoot without that.

  • I would need to see your capx to tell what you have going on.

    Hard to trouble shoot without that.

    its very simple. it's an enemy that spawns and starts moving forward, and once it is off the screen i need him to be destroyed and player loose a life

  • So, you create them off screen. They move in view, and then they sneak off screen. The second time they go off screen, you want to destroy them.

    That, or the spawning has a flaw (well, that is a blemish in the spawning too).

    Your really need help ? Spawn your capx in a sharing site. Ty.

  • So, you create them off screen. They move in view, and then they sneak off screen. The second time they go off screen, you want to destroy them.

    That, or the spawning has a flaw (well, that is a blemish in the spawning too).

    Your really need help ? Spawn your capx in a sharing site. Ty.

    i got it to work! thanks all!!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)