3 questions

0 favourites
  • 6 posts
  • Hey everyone,

    I am making a platform game and I'm just wondering how I can set an animation for attacking while jumping instead of the same attack while on the ground (while using the same button to attack as I do on the ground).

    2nd question is how could I make a dash happen. I have the sprite for it and have his mad speed going higher during that sprite, but I still have to hold the direction I want to go (which I don't want to have to do). Also I am having trouble getting him to stop having that max speed after dashing. I have it set to where to whole animation plays and then he will be slow again, but if I jump or some other sprite int interrupts the "dash" sprite he continues to go at a ridiculous speed.

    3rd question is I have a combo made of 3 different "Attacks" (all the same button). If I click too fast then I cannot use the attack at all anymore....anyone know how to prevent this?

    dropbox.com/s/2h81lhsa2ux8y2v/Test2.capx

    Controls: W = Jump, A = Left, D = Right, Shift = Dash, Left Mouse Click = Attack (which is a combo).

    I know this is a lot for one post, but I thought it would be best to put it all together. Sorry if it's any inconvenience and thanks for any effort to help.

  • I'm not at home so i can only share theory :D

    1. You can check to see if your character is in the air or ground. Add that to your condition. Or more specifically

    On Attack Button

    -> onGround - do events

    -> inAir - do events

    however an alternative which reduces condition checks. Assume player starts on ground :D

    Group Ground

    Jump button -> Jump, enable Group Air, disable Group Ground

    attack button -> do ground attack

    Group Air

    onlanding -> enable Group Ground, disable Group Air

    attack button -> do air attack

    2. more manual control of the setVelocity and or speed. As practice just set speed for each action. this way interupts will change the speed back to normal. I'm not sure if your looking for Velocity or Speed.

    3. you need more conditions.

    conditions:

    attackbutton

    and NOT(animationFrame > attackFrame First) & (animationFrame < attackFrame last)

    action-> do attack

  • I can not help you with your problems, but I want to give you some advice.

    You are not allowed to use mega man sprites in your game, because the mega man franchise is copyrighted. At least you should avoid to use them in commercial games, otherwise you are likely to get sued.

  • Yes Astrosus, I am aware of this. I'm just using the sprites to practice with. Not planning on releasing this.

    jayderyu - I got the jump down now working on the rest. Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I need a bit more explanation for the 2nd and 3rd Jayderyu

  • Here is what I have as of now:

    dropbox.com/s/2h81lhsa2ux8y2v/Test2.capx

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