Different ammo from actors

hi, I have a vacuum gun that picks enemy actors from the world and store the last enemy type. now I want to shoot different types of projectiles based on the last enemy picked from the world.
There is anything I can do?

What are the types of projectiles? Classes? What are the criteria of enemy - projectile type? Perhaps the easiest solution is to store the desired Projectiles Class in the enemy itself and then:

Could work well assuming you have a base enemy class.

hi, thank you. I have this and now I made the projectiles

all the logic of the shooting mechanic (not the projectiles or the damage for the enemy actor) is stored in my character pawn.

can someone help? ^^

hey, always me :wink: can u, or someone help me? I’m trying to follow what u said but I don’t know how to figure it out. I have enemy class master and 4 types of child enemy.
I did this in the enemy master BP


so I changed the class type for all 4 child enemy putting the class of bullets.
I don’t know how to continue.

How do the enemies store the projectile class you’re supposed to obtain after picking them?

Each enemy has a class variable of the desired projectile? Since you have access to the picked enemy, spawn projectiles using their variables. Or copy it from the enemy.


How many variants are we walking about? Perhaps you could simply map them in a dictionary based on the enemy type, eliminating the need for them to store class variables.

In your image you show this:

You could read the value of the projectile class from defaults (assuming there’s a base class) and plug it into the spawn Actor node. Or, instead of storing the class of the enemy, store the class of the projectiles the enemy had assigned.

Or read it from the enemy class’ defaults:

image

Would that work?