LittleStain's Forum Posts

  • Put the healthbar on a different layer with paralax set to 0,0 ?

  • Do you want me to make you a logo?

    No thanks, I make my own logos..

  • Why create a new topic with exactly the same question?

    Or would you like the same answer twice?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EDIT: UPDATE:

    took off pin, that is not the problem. But I am spawning another object, could spawning the object at the same point break the joint?

    Seems like you are using the pin behaviour in combination with the Physiscs behaviour, which is not recommended..

    Mixing other behaviours with the Physics behaviour can (and probably will) create unexpected results..

    Without seeing your events and/or capx it will be nearly impossible to answer your question.

    We can only guess.

  • Does this help?

    Save Variables Improved

  • Something like this?

    Using the container object both sprites will only reference the one created with it..

  • How are you doing the destroying?

    Which events/conditions do you use?

    Could you add a is on screen condition to the on destroyed event maybe?

  • This is how it works:

  • From the manual:

    Mouse expressions

    AbsoluteX

    AbsoluteY

    Return the position of the mouse cursor over the canvas area in the HTML page. This is (0, 0) at the top left of the canvas and goes up to the window size. It is not affected by any scrolling or scaling in the game.

    X

    Y

    Return the position of the mouse cursor in game co-ordinates. This is (0, 0) at the top left of the layout. It changes to reflect scrolling and scaling. However, if an individual layer has been scrolled, scaled or rotated, these expressions do not take that in to account - for that case, use the layer versions below.

    X("layer")

    Y("layer")

    Return the position of the mouse cursor in game co-ordinates, with scrolling, scaling and rotation taken in to account for the given layer. The layer can be identified either by a string of its name or its zero-based index (e.g. Mouse.X(0)).

    so:

    mouse.x(0) - would be the x-position of the mouse on layer 0

    mouse.x("HUD") - would be the x-position of the mouse on layer with the name HUD

  • There are so many ways to make something like this it all depends on what you'd like to do with it..

    Which part of this do you have difficulties with?

    The red block moving from left to right and back can be done with many movement behaviours

    Stopping the movement on space bar shouldn't be hard..

    Comparing the position of the red sprite and determining it's distance from either 1 or 25 to get the right value could be done by comparing the x-position or distance

  • Like I said..

    If you use Player.8direction.movingangle it should work..

    system is within angle : Player.8direction.movingangle is within 5 of 90 - play animation "down"

  • Seeing the video, you could also just put all the compare variable conditions as subevents of the every x seconds event in which the choose action is performed..

  • first make a global variable called sprite count then go to the action "for each" under the system object which allows you to say "for each "sprite" add 1 to sprite count.

    This will add 1 to the variable for each enemy every tick..

    After 1 second with 10 enemies at 60 fps the variable would be 600

    resetting it to 0 every tick before repeting the for each event would solve that ofcourse,

    but enemy.count will allways stay at the amount of instances of the enemy object present, so using that would be much easier..

  • > You can use int(), floor(), ceil(), round()... with random() to get rid of decimals. For example random(5) can give you 4.42425353.... but int(random(5)) will give you 4.

    > Or you can use choose(1,2,3,4,5,6,7,8) to chose one random value

    >

    I am trying to make a boss that makes it spawn a random enemy when x=1. But now when I do this it spawns a TON of them

    Could you please share the event/conditions you use for the spawn action and explain what is happening now and what you expect/like to happen?