RM2K3 DAMAGE SPECIFIC ATTACKS ON PLATFORMER

Posts

Pages: 1
pianotm
The TM is for Totally Magical.
32347
Okay, so I've started making a new project. It's a 3D side-scroller like the old 16 bit games (Think Simpsons, where your character had room to move up and down).

Obviously, I am not using the inbuilt combat engine, but have figured out how to make my character directly attack. I've given her the ability to punch, kick, and jump, and had planned on using the whole number pad to give her a fully ranged martial arts system of combat. Here's the thing: what is the point of giving her more attacks if you can't make them vary in strength? I'd like to be able to give her combo moves, but how do you make a single attack hit more than once (if not just a really strong hit)? I've almost got a playable demo ready, except I need to know if I can add capabilities, or if I'm already at the limit. For that matter, can give the same range of variables to my enemies?
So you're making a beat-em-up game in 2k3 and you can't figure out to make an attack vary in the power stat? Forgive me, but I think you're over-reaching your own skill. That would be the most basic of all the complicated thing you will need to do to make this kind of game work.

When your character does a punch, part of the code will be the activation effect. The first part is the visual, but at some point you will be putting some code for the effect. If you have two different punches you would put two different values for punch. You could instead use a variable in the code, and the stronger you get the more damage your punch will do. Or you could use several variables to create a formula that takes multiple things into account: your str stat, which move, which order in a combo.

To create a combo you add 1 to a variable at the end of the activation code. At the start of each move it checks what the combo variable is and does a different move for each possibility.

Branch = 0
Do simple punch
add 1 to variable
Jump to label 1

Branch =1
Do simple kick
add 1 to varaible.
Jump to label 1

Branch =2
Do drop kick
add 1 to variable.
Jump to label 1

Label 1

Branch (greater than or equal) 3
Set variable to 0

Jumping to label prevents the second move in the combo from occuring by jumping to the end of the event. The next time the player presses the attack button, it will do the next branch and only 1 branch each time.

Once the variable reaches the end of the max combo, it resets back to 0.

Probably have some kind of outside timer that resets the combo to 0 if you don't do another move fast enough.

So how exactly are you going to track where on the map the hero does the move, what move it is, and which enemy the move is being used against?
Not to mention the nightmare it must be to constantly update Picture numbers to properly show who's behind who...
...Unless you use tile-based movement and regular sprites (which kinda goes against one of the fundamental aspects of beat 'em ups).

For the combo timer variable set it to, say, 15, right below Label 1 and turn on a Switch. Make sure that not pressing anything does not lead to Label 1.
Make a new Parallel Process event activated by that switch, that waits 0.0 seconds before subtracting 1 to the combo timer variable. When the variable reaches 0, reset the combo attack variable to 0 so the next hit will be the simple punch.
pianotm
The TM is for Totally Magical.
32347
I kind of got the idea for this project two weeks ago. I took a break from my big project and started working on this as an experiment with variables and that trigonometry tutorial. This project was nothing more than an experiment in understanding how common events work. Now, it's turned into a fan game, very quickly. I almost have a whole level. I had no idea it was this easy.

My enemies can detect the hero in a certain range. Right now, all I can do about attacks is: Attack Range common event detects whether punches and kicks make contact with enemies. Yes. Switch turns enemy off. No. Switch isn't activated. So right now it's one hit kills which pretty much makes it difficult to design boss fights. Essentially, it's stuck on the old Mario formula Assigning Global Coordinates to two variables (X and Y) let's me track my hero's movement on the map and the trig script lets me track the location of my enemies and whether and when they react to my hero. A common event determines how my hero takes damage (she has a life bar with 100 HP and one variable gets assigned to each HP, from 100 to 0. Variable 0 is full health. Variable 100 is death.). If she makes contact with an enemy, they call the event and HP is reduced by random variable 1-5 (or more, once I make more damage events and assign them to specific enemies).

Punch Common event assigns attacking and punching to variables and a branch condition lets me determine where the attack goes (the attack is represented by showing a Battle Animation. I drew all the sprites. It only took a grand total of two hours.)

Kick event does the same thing.

Attack Range common event (one of these for each attack) lets me tie my attack, punch and kick variables to coordinates X and Y.

I never took trig. This all grew out of math I didn't understand (I have an uncanny knack for math), and it worked. I have a functioning beatemup right now, but it's far too basic. Thank you, Link, for giving me what I need to at least increase attack strength, and my options with those variables are essentially limitless. I am literally only limited by the number of keys I am allowed to assign. There's just something so elegant in the way this engine works (or perhaps in the way we can make it work).

I'm thinking of removing the jump key all together and replacing it with local events because I can't get her to jump over obstacles. RM2K3 can show a jump animation. It can even let you jump over bottomless pits, but no matter how hard I try, I can't get her to vault a single unpassable tile. The only way I can do that is with the jump tutorials in the Development section, and those can't use jump animations. With local events, I can at least put obstacles in, then create a move event that when the action key is pressed, let's her vault the obstacle, similar to Lara Croft climbing on a low ledge. It still bugs me that I can't give her full jump ability without sacrificing visuals. (And even as I've typed this, I think I've figured out how to satisfactorily work my way around this problem, by putting event's near obstacles that detect whether or not she jumps and having them take over until complete. This would also let me have her jump and down from ledges, which is really why I wanted her to be able to jump as I have no intention of putting bottomless pits in.).

I love local events. I dare say I overuse them. I've figured out how to make climbing events, club events, and I'm even starting to understand how the Hunting sidequest in FFXII works. My main project is turning into a regular Elder Scrolls type game with fighting guilds, mages guilds, priest guilds and you name it.

Well, anyhoo, thank you so very much Link. I will certainly start tweaking my attacks to see if I can get some variety out of them, and your explanation also suggested how I might give my enemies some HP and forego using the switches.
Pages: 1