Asmodean's Recent Forum Activity

  • You don't have it to do this way. You can put most of the code direct in the keyboard events, but this is my way to do it, because I like it clearly arranged and I think it is easier to maintain.

    There are several other ways to arrange the code, it's all about personal preferences.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The variables are some kind of states with them you can protect events, like the isDead event.

    I changed a litte more in the capx. I use a Timer-Event for the attack, so the states are automatically set back and now the player can only attack once per pressing the attack button. Also the attack animation will now break the jump animation, but it has still some flaws.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

  • I changed your cpax a little bit. I hope now it's a bit clearer.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    But there are still some flaws in it. For example, if you press s for attack, you will attack the whole time. I don't know what you're up to, If you want to stop if you attack or a new running attack animation ect. so it's your decision how to fix that.

  • Your TiledBackground2 isn't complete white. There is a line of pixels on the top and on the left which are transparent. Change them to white and it will work.

  • I have no experience with timing of sounds so this is all a complete guesswork, but did you do the timing with the overlapping the pattern with your seekbar? I wouldn't do something what needs a exact timing with a collision or overlapping event.

    I would put the pattern in an array and use the array to play the sounds in the correct order.

  • You could give your player and enemy an instance variable like isDead and set if if in your collision events. And check in your events where you change animations, if isDead set to false.

  • like this:

    In this example you spawn a Sprite every 2 seconds randomly between x=840 and y=480 with one of the animation: animation1 or animation2 from Sprite.

  • The problem is, that your destroy-event is not triggered. The destroy-animation takes to long to be finished. The player is after a short time of the collision with the enemy back in the running-animation. So the destroy-animation never finished and your player will not be destroyed.

    With your enemy it's the same problem.

  • You have to unpin the spritefont and set the y-position new, after your scaling-event happens.

    event -> Spritefont | Pin unpin
          -> Spritefont | player.Y-player.Height/2-SpriteFont.height
          -> Spritefont | Pin pin to Player
    [/code:fcnbet1m]
    
    If your scaling is continuous you could use every tick instead of pin to set the position of the spritefont every tick. 
    
    System| every tick -> SpriteFont| Set position to (player.X-SpriteFont.Width/2, Player.Y-Player.Height/2-SpriteFont.height)
    
    The origin has to be in the middle of your Player-sprite.
  • It depends if you have only instances from one object or you have instances from different objects, then you have to use a family.

    I made a little example:

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

  • Ahh, now I understand.

    I'm afraid I can't really help you with that, that it really look good. There are people here I believe are fare more competent for this kind of problem.

    But I've tried something.

    It works, but it doesn't really looks like something 'flies in'.

  • What do you mean with 'de-spawning'?

    The easiest way is to create the object outside the viewport and move it into it.

    For example:

    System| Every x seconds -> System | create object Sprite on layer 0 at (-sprite.width-1, y)

    This will spawn an object on the left. -Sprite.width-1 pixel outside of the left border.

    If your sprite has the width of 32 it will be created at x=-33, y.

    Now you have to move it:

    System| every tick -> Sprite| Move forward -1 pixel.

    If you want to spawn it at the right side:

    System| Every x seconds -> System | create object Sprite on layer 0 at (OriginalWindowWidth+Sprite.width+1, y)

    System| every tick -> Sprite| Move forward 1 pixel.

    OriginalWindowWidth is the Windows width in the project settings.

    This will work as long as the screen doesen't scroll, then you have to use viewportleft and right

Asmodean's avatar

Asmodean

Member since 31 Jul, 2015

Twitter
Asmodean has 9 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies