Almostpeaceful74

|
Hello again
So I'm trying to put a simple live-action battle system into my game (with animations and stuff) and I kinda have a vague idea of how I want it but absolutely NO idea on how to go about making it...
my game is a top-down rpgish thing, pretty generic, and for the battle system I would like to put in a general melee-attack (with a sword or something) and hopefully a ranged attack too, both hooked to different buttons on the keyboard.
If anyone has an idea, really anything would be immensely appreciated. As I mentioned before, i'm not totally clueless, I just don't really know where to start.
Thanks
Posted on 2010-03-17 22:36:27
|
awkward_moment

|
If you're still interested, here's a bit of info and an example:
Let's say we're making a game starring a guy with a sword, and that the sword will only connect against someone on the dial directly in front of them (in the direction they're facing, obviously).
Now, let's take generic monster and drop it north of our sword guy and assume he's facing North, toward that monster. Direction, I believe, carries a variable (and if it doesn't, it can be arranged in the movement script). If your variable is for North, the foe's position on the X (horizontal) axis is the same as yours, and their position on the Y (veritcal) axis is one tile (we're using tiles for this, I suppose, but it will work either way) above yours (so that they're next to one another), that means your swordguy should be able to connect his attack. Either way, display the attack animation, but if it connects, make the enemy do whatever 'i r hit' animation it uses (if any) and deduct the appropriate number from its current health.
That should work out for a simple method, so I hope it helps, at least as an example! :)
Posted on 2010-06-20 15:50:34
|