dop2000's Forum Posts

  • The right way would be to count the number of shots as MadScientist suggested.

    But my example in the screenshot above also does what you want - fires 10 shots in 0.1s intervals and then destroys the gun.

  • Not sure I understand your question.. Do you mean something like this?

  • Add an instance variable "id" to your sprite. Set id=1 for the first instance, id=2 for second etc.

    On start of the layout:

    Pick Sprite with id=1, Start timer, Start animation

    On timer:

    Sprite destroy

    Pick Sprite with next id, start timer, start animation

  • Yeah, it doesn't work like that.

    You need to insert player's name into the text using events.

    Change you text in the XML to something like this:

    "Hello %player%, you have %gold% coins."

    Before displaying the text on the screen you need to search for %player% and %gold% tags and replace them:

    message= Replace(message, "%player%", Player.Name)

    message= Replace(message, "%gold%", str(Player.GoldAmount))

  • Hey, I made my version of this game just a few days ago! But in my game the ball is bigger and moves slower, so I don't have this problem

    Try to make walls thicker, add the second line of defense.

    Remove "Ball on collision with wall -> bounce ..." event, instead add Solid behavior to the walls.

    Even after that when I left the game running for 10 minutes, the ball managed to escape.

    I would add another sprite in the top left and top right corners, just outside the layout. If the ball collides with that sprite, you will know that it has escaped, and you can return it into the layout with something like this:

    Ball Set position to (10,10)

    Ball Set Bullet angle of motion to 45

  • Unfortunately, this problem exists in all browsers, not just Firefox.

    For me the only solution was to use spritefonts.

  • Something like this?

    On button clicked
    System -> Compare two values -> Int(TextBox.Text) equals CorrectAnswer
    [/code:30aghlwo]
    
    .Text property of the TextBox stores string data, and I assume that the CorrectAnswer variable stores numbers.
    That's why to compare them you need to use Int(), which converts string into number. 
    
    Another way:
    [code:30aghlwo]On button clicked
    TextBox -> Compare text -> Str(CorrectAnswer)[/code:30aghlwo]
    
    Here is an opposite thing - you need to convert the number CorrectAnswer into string, you can do it with Str() function.
  • You are on the right track.

    Create a family with all 3 sprites. When any family member is created, save its UID.

    Then when "undo" pressed you can destroy this family member.

    The only problem is that it only gives you one undo step, but I'm sure you can modify this code if you need more steps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of the "Every X seconds" event, use Timer behavior.

    You probably don't need "For each .." condition in the "On timer" event, but I prefer to add it for clarity.

  • Is it lagging on PC or on mobile? Are you using any WebGL effects?

  • You don't need to pin sprites. Just change their position to (self.X+something, self.Y+something)

    They should maintain the pattern.

  • Say, you want the whole group of sprites to move 500 pixels down, do this:

    Sprite -> Set position -> (Self.x, Self.y+500)

  • Happy to help!

  • I think with image point set to -16, the hitbox collides with the floor after you teleport it, and is bounced a fraction of a pixel up, that's why its state briefly changes to falling.

    If you run your game in debug mode, you'll see that there is always a tiny gap between the hitbox and the floor. Hitbox Y position is something like 63.96 after climbing on the wall, not 64.

    Try changing the "hitbox->Set position to wall" to this:

    hitbox -> Set position to -> (wall.ImagepointX(1) , wall.ImagepointY(1)+0.6)

    As a result, after you teleport it, there will be 0.4 pixels between the hitbox and the floor, so no collision. And these 0.4px will be rounded to 0, so no gap will be seen.

    Not sure if this is the best solution, but it works.

    Alternatively, you can add some extra checks to your "Platform is falling" event, to not change animation if the player has just climbed the wall and is not actually falling.

  • Not to "time_font", to time_font without the quotation marks!