Beginner question for attack

Started by Toni, August 14, 2008, 01:42:04 AM

Previous topic - Next topic

Toni

(I hope this is the right place to ask...)

So I've decided to try and create my first character. It's coming along nicely, but I've hit a problem with one of my char's attacks.

Basically, I want my character to perform an attack which just pushes opponents on the ground back (like a regular attack would) but an airborne opponent would be knocked to the ground.

One or the other works fine, but I don't know how to make the attack have both effects. I've tried it with two separate HitDefs, one with the hitflag being M and the other being AF, but that obviously didn't do the trick...

While I'm at it: are there any good beginner-friendly tutorials for using projectile-attacks? KFM (who my char is based on) is no help in this field, and I'm hesitant to rummage in other chars' codes because I don't want to step on anyone's toes, at least if I don't have to.  ;)

Edit: Problem solved. I forgot to add an additional trigger. --; :sugoi:

Bastard Mami

I will write  a very simple projectile tutorial.

1) make the attack code as if it was a regular attack

2) instead of a hitdef use

type = projectile

done.

just make sure to read the type= projectile parameters to know what you need to add, and post here in case of doubts.

post your code for the attack you are having problems with, so it is not changed too much while fixing it.

Toni

#2
Quote from: Byakko Vazquez on August 14, 2008, 01:48:28 AM
I will write  a very simple projectile tutorial.

1) make the attack code as if it was a regular attack

2) instead of a hitdef use

type = projectile

done.

just make sure to read the type= projectile parameters to know what you need to add, and post here in case of doubts.
Oh... heh...  :P
Thank you.  ;D

Quotepost your code for the attack you are having problems with, so it is not changed too much while fixing it.

Okay, this is the code as I've tried it:

Edit: Found the problem. Thanks anyway :)