Help with NPC(s) Attack

Hello. I’m making a Dragon Ball Z type game and I want my Goku NPC to be able to do more than just punch you if you’re up close. I want the NPC to be able to fire small ki blasts or a Kamehameha if you’re at a range away from him. How would I go about doing this? I’m not very good with AI systems right now.

2 Likes

If you’re not good with AI systems, I recommend you not to create this topic and go learn AI systems from YouTube. There’s a lot of tutorials about this. I recommend you to use Magnitude that constantly checks the distance in studs between your NPC and the player. When it meets a certain distance in studs that you like, just make a function that spawns whatever thing is that and call it.

1 Like

Okay. I’ll look into doing this. Thanks!

1 Like