Double jumping/character selection help

This forum is currently in read-only mode.
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hello all. I'm working on a project for my english class, essentially a very low-end copy of the popular Super Smash Brothers franchise, except with characters from the books we're read throughout our highschool careers.

    I've run into a few problems that I can't seem to solve on my own, and an explanation or example would be greatly appreciated.

    The first problem is double jumping. I can't seem to find a good tutorial on setting the conditions for it, and if there's a preset, I couldn't find it.

    The second is character selection. Essentially all the characters will have the same movement and attacks (for now), so all I really need is a menu/option that will change the skin on each player's character. I've included in this little mock-up I've made two characters, with the controls set to one.

    Any help would be greatly appreciated. We've been given a week to do the entire thing, so I'd like to get these issues out of the way asap. Thanks!

    http://dl.getdropbox.com/u/676998/HsBkl ... %200.2.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Double jumping can be solved with the platformer behavior you are using by simply making a check on your jump button like...

    +is 'Jump' pressed

    +is 'Player' in Air

    +then do Jump

  • I'm working on a project for my english class... we've been given a week to do the entire thing...

    Wow, one week? Perhaps you should have made very sure you were able to do the things you need to do before committing to this assignment.

    Anyway, here's some theory on making a character select:

    • Create a grid or line of character portraits
    • Create a "selector" sprite that is a box outline or whatever
    • Move the selector with the arrow keys in grid units
    • When the selector is overlapping a character, set a global variable "playerOneChar" with that character's name
    • Hit Enter or whatever, selector sprite changes color
    • When the selector is overlapping a character, set a global variable "playerTwoChar" with that character's name
    • Hit Enter or whatever, level starts
    • Start of level, get global('playerOneChar') and set player one's sprite accordingly
    • Ditto for player 2
  • Set the platform movement to a rectangular solid sprite. Position animated character sprites to it. Have a variable to have 1 visible and the rest invisible. Use Families for the animation events.

    For when you want the characters to do different things add in event sheets/groups to indvidualise them(the platform movement and actions etc) and switch the groups on/off along with the animated character sprites.

  • Thanks for the help everyone. I do have a week to do it, but while the rest of my class is fumbling around with construction paper and markers, I assume even a failure of a game will be far beyond my teachers expectations. I'm going to work on implementing the above now; when I make some progress I'll probably post the updated version. Thanks again.

  • Double jumping can be solved with the platformer behavior you are using by simply making a check on your jump button like...

    +is 'Jump' pressed

    +is 'Player' in Air

    +then do Jump

    This will not work the way you think it does because it does not limit the amount of times a player can jump. You need to make another condition that checks if the player has already double jumped and then set it back to 0 when he lands.

  • Yeah, I got around the above by setting the previously stated conditions, but also creating a 'Double Jump' private variable. One is added to the variable every time the player jumps.

    It looks like so:

    1[Player is jumping-----------------------]-------------------------{Do jump}

    -[=//=Player is on ground----------------]

    -["Double Jump" is equal or less than 1]

    2[Player is on ground---]------------------------------------------{Set "Double Jump" to 0}

    -[=//=Player is jumping]

    The last condition had to be added because when the player jumped, as he left the ground, Double Jump set to zero due to a tick while still on the ground. This allowed the player to triple jump, as well as reset the counter by passing through platforms.

    Efficient?

  • Hmmmmm. I've been looking, and I can find a lot of chat about how you can't attain jump sustain by manually writing P2 controls. Anyone care to give me a hint at how I write P2 controls at all? I'm not worried about losing sustain or mild functionality. How do I..... I guess disable the standard controls for Player 2, yet allow them to still function for player one? Or is there a more efficient way?

  • Basically, the gist is that manual Jump actions don't respect jump sustain. So if you tell an object to jump with an event (instead of the object receiving an actual a control press) then there will be no jump sustain, because basically there's no action that says "hold the key down for a while to sustain the jump." And since there were no official player 2 controls previous to .99, the only way to make a second player was to manually tell a second platform object to jump with an event.

    Now, in .99 and above, there are proper second player controls that can be configured in the app properties, so you can set up real jump controls and have real jump sustain for a second player. So if you're lucky enough to be able to create and export your project with the unstable 0.99.2 build by the time your project is due then you should be golden.

    But if you don't want to take the chance that you might not be able to finish an already risky class project then I suggest using 0.98.9 and just not having jump sustain.

    And I guess that's all rather beside the point. Here's how you manually make a Player 2 with events:

    Start of layout -> Platform2: Ignore Input (on the P2 object)

    Key (move right key) Is Down -> Platform2: Set X Component of Motion to positive amount

    Key (move left key) Is Down -> Platform2: Set X Component of Motion to negative amount

    Key (jump key) Is Pressed -> Platform2: Jump

    Those are just the basics, though. You will need to tweak it a bit to work properly.

  • 1[Player is jumping-----------------------]-------------------------{Do jump}

    -[=//=Player is on ground----------------]

    -["Double Jump" is equal or less than 1]

    You need to increment double jump and just check if it is 0

  • Jesus Deadeye.

    What would half this board do without you?

    All was very helpful. All I have left to do now is draw the other characters, at least one background, and establish a hit-velocity system. I'm not sure exactly how I'll be doing the latter, probably just exert a force in the angle of the projectile that is a number multiplied by a damage percentage.

    I know the player one selector is very slippery, and that you can roam off the names, but it's not going to get fixed until I have the rest of the game established.

    Only playable characters for player one are 2001, Clockwork, Crucible, and Fahrenheit

    Player two can only play as Fahrenheit, without projectiles.

    Enjoy? Tips? Major problems?

    http://dl.getdropbox.com/u/676998/Earlytest.exe

  • Okay. After all the help, this is the finished(ish) project, or, rather, the project I'm handing in.

    There are a few problems, like the slippery player one selector, that I just don't have time to fix.

    I intend to iron those out despite handing the flawed one in, just for practice's sake.

    Hope you enjoy it!

    http://dl.getdropbox.com/u/676998/HsBklstFight.exe

  • Haha, I love how the Chief throws water fountains . Awesome.

    Too bad you didn't have time to make any backgrounds, but good luck on the grade

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