I'm wondering what would be the best way to do this: A boss enemy tosses a smaller enemy as a projectile. After landing the thrown enemy starts behaving like a normal enemy with walking, shooting etc.
My ideas would be either to make an enemy blueprint that has this behavior defined (for example, all the "normal" behavior is turned off until it lands), or to make two classes, the projectile and the enemy... then somehow convert them?
But how would I do it? I'm more interested in the latter method. The first one I could figure out myself. So how would I change the projectile to an enemy? Define some casting? Destroy the projectile and immediately spawn an enemy?
EDIT: What is really interesting to me is the technical side of the problem. If we go with the route of enemy who starts as a projectile and turns into a walking enemy, that would probably involve 2 sets of AI (I'm just grasping that, forgive me) and some trigger to switche between them, like hitting a wall. Seems simple.
If we go with the route of 2 classes, the transition is what bothers me. The most simple way would be to destroy the ProjectileEnemy and spawn the Enemy from it. That obviously won't work - after destroying Projectile enemy, there's nothing to call "Spawn" method. I have a crude workaround, spawn Enemy first and immediately after - destroy ProjectileEnemy. Won't that cause visual issues and other problems though?