i need help in making sword combat system like dark souls in which you have combos and can parry and block. any ideas on how to approach it and which method to use for detecting it two sword hit each other and how do i make a parry system?
tag each sword as “sword” then in a script attached to the sword.
public class Sword {
bool parry;
OnColliderEnter (Collider other){
if(other.tag.equals(“Sword”)){
parry == true;
}
}
}
you will have to either send info to the other “person” that their attack was just parried. you can access the other “person”'s script via the oncolliderenter if you wish. for blocking all you have to do is on whatever object is attacking to call the “other” object and check if its blocking, if so , run your “blocked” animation or whatever.