Third Person Combat Course Issues, Part 3/3

Try removing the collider from the Weapon and adding a new one.

Done that, still no results

Make sure that the weapon isn’t tagged as static. (running out of ideas)

AND… I just noticed what went wrong. When creating the Ragdoll, I accidentally set my Weapon’s layer to be a Ragdoll as well. I reversed that back to ‘Default’, and all seems to be working just fine (I’m hating this ragdoll so much nowadays :confused:)

ANYWAY, Next step for tomorrow will be me trying to implement this project into my RPG Project, before I try implementing any brand new systems (I have a ton of fun ideas, and this can literally go on forever). I’ll open a question up for that (I think I did that before, not sure… if not, I’ll open it up in a bit)

This, and I’ll also open a second question regarding the fact that my enemy keeps falling through the floor every time he dies

Before we go and try making a wild, crazy implementation though, I have one last question. When doing the implementation, do I manually copy paste the stuff from that project there, or do I create it as a Unity Package, and then import it to the new project? Sounds like a nightmare coming up tbh

NEITHER
Wait until I finish the tutorial. If you just go jumping in willy nilly, you’ll break your project and I won’t be able to help you. I’m hoping to get it done this weekend, but it might be over Christmas break, we just picked up extra shifts before the holiday break.

Completely understandable, wishing you all the best in your Engineering adventures from here :slight_smile: (although I’d have loved to jump into nilly willy, that sounds like fun :stuck_out_tongue_winking_eye: - not this type of nilly willy though). In the meanwhile, can I at least attempt to integrate more systems into either project?

On your own, yes, but remember, the more time I spend on it, the less time I’m spending writing the tutorial.

Bahaa goes ultra silent

No worries, please take your time Brian to ensure it’s a great one (I know it’s going to be a great one. In the end, it’s Brian making it xD, although I’ll be the first one to test your tutorial). Hope to hear about the tutorial soon :slight_smile:

hi again Brian. Quick question on the fly. For ‘State.cs’, can I make it inherit from MonoBehaviour, or are there potential risks in the future?

The reason I’m asking is because when my enemy gets impacted, the fact that his weapon is still enabled means it accidentally hits my player when the enemy is impacted, so both of us are impacted now. To combat this, I tried enabling and disabling his weapon when the enemy enters ‘EnemyImpactState.cs’ in a new ‘OnEnable()’ and ‘OnDisable()’ functions over there, and to get the component to be enabled and disabled, we have to use MonoBehaviour’s “GetComponent<>();” function

So, is it possible to do that, or what are the recommended workarounds for this? (The inheritance was blocked by Unity anyway)

No, as a MonoBehaviour can only exist when attached to an object, and it adds a ton of unneeded overhead.

Remember that the weapon is turned on and off by an Animation Event… Try adding a DisableWeapon (or whatever event you are using in the attack animations) to the beginning of the animation the enemy is using in the Impact State.

Privacy & Terms