Best way to script monster attacks

Hello all,

I’m working on my first personal project with Unity, I’ve some experience on game programming with various frameworks (Android API, Libgdx ecc…) but I’m an absolute beginner on Unity.

What I want to achieve is a sort of vertical shoot’em up and I’m wondering what is the best way to script attack of monster while the camera moves through the scene. Do I have to script manually in C# with some kind of “trigger” the camera activate on its passage, or there is some suitable tool?

Thank you in advance.

Lorenzo

Hi,

There is this method that gets called when object becomes visible in camera,

for triggers, can use colliders… so say your ship enters nearby some point, there is (big) invisible trigger collider:

1 Like

This is what I was looking for! I could put enemies in the scene in a “sleep” mode and wake them up when they become visible, simple and effective!

Probably this method is the simplest, but I’ll try them both!

Thank you very much!

Lorenzo