Aller au contenu principal

Recherche

How do I make a melee attack without damaging the player character?

  • raz0rbackzwei

    I will cover your primary question:

    Using labels is great for that. You can set which label should be detected and work from there. So if your sword detects only "foe", the health modifier inside the sword will only modify the health from the object with the label "foe" as well. You can then choose if it should be based an a hit detection or zone.

  • Hawkensson

    Thanks! But would that work also if I wanted to add a second player to the game? Because then how would my sword know which player is the foe? Both player's can't be tagged as Foes for this method, right?

  • raz0rbackzwei

    One is "Friend" and one is "Foe". That should do it

  • Hawkensson

    How about if I want to have many characters? It seems like the health manager only has a few options for labels, I would eventually have to reuse labels, e.g having two characters labeled as "friend", which would make them unable to attack eachother?

  • raz0rbackzwei

    You can also use tags for multiple different characters

Vous devez vous connecter pour laisser un commentaire.