Asmodean's Forum Posts

  • Yes, its possible. The easiest is to use 'Pick nth Instance .'

    System| Every 1.5 seconds
        local static number x=0
        System| Pick kanobär instance x -> System| Create object Fireball on .....
                                        -> System| Add 1 to x
       
        System| x>= kanobär.count       ->System| Set x to 0
    [/code:14alquwr]
    
    You don't have to use a local static variable you could also use a global
  • For each as subevent after 'System| every 1.0 seconds' or you could use instead of 'System| create object', 'Kanobär|Spawn Fireball ...', but then all of your sprites will fire at the same time.

    If you don't want that use 'System| Pick a random instance -> System| Create object...' as subevent after 'System| every 1.0 seconds', that will randomly choose an instance that fire a fireball.

  • For a 1-Dimension Array with values in the x-axes

    Array| for each X element.
          System|array.CurValue >=1      -> Do something. 
          System|array.CurValue <=30[/code:3scnf0xp]
  • In System ,compare two values. Make two events x>=1 and x<=30.

  • Did you mean repeat? Do you want to repeat something 30. times?

  • That's really strange. Could you try my capx?

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

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.