POCKETS
Terrarian
OK, so I've asked about projectile trails in the past, but that involved dust, and that's not what I'd like to accomplish here.
In my previous thread on creating a dust trail at a set distance behind the projectile, the code that was used utilized a ring array. I don't know that this would be an efficient way of handling this this time around, but we'll see ;-)
Alright, so here's what I am trying to accomplish -
I need a trail behind the parent projectile that are basically copies of the original projectile at set distances behind that original projectile (a distance that I can set on a per copy basis). I also need to control their alpha values individually (each separate copy).
At this point, you may be thinking about ProjectileID.Sets.TrailCacheLength[projectile.type] which basically stores the old positions and uses that as a trail, just like the example bullet. However, this won't work for me. Using this, the projectile copies are much too close together, I cannot set the distance for each copy, and I cannot control their alpha values individually.
Here's where it gets fun -
These projectiles also have homing capabilities, so the copies also need to follow the "path" of the original. As I mentioned above, in the other thread regarding dust, a ring array was used, but I'm not certain that would apply here. It has been suggested that I use Projectile.NewProjectile to spawn the copies using a List<> of the original's stored positions, and I like this idea, but I'm not sure this would be viable.
Whether this requires a list or an array, I need to be able to control not only the distance for each copy, but also the alpha value per copy. Unfortunately, I don't think I can use dust in this particular situation, as the projectile has a distinct shape, so the shape needs to rotate with the original.
In my previous thread on creating a dust trail at a set distance behind the projectile, the code that was used utilized a ring array. I don't know that this would be an efficient way of handling this this time around, but we'll see ;-)
Alright, so here's what I am trying to accomplish -
I need a trail behind the parent projectile that are basically copies of the original projectile at set distances behind that original projectile (a distance that I can set on a per copy basis). I also need to control their alpha values individually (each separate copy).
At this point, you may be thinking about ProjectileID.Sets.TrailCacheLength[projectile.type] which basically stores the old positions and uses that as a trail, just like the example bullet. However, this won't work for me. Using this, the projectile copies are much too close together, I cannot set the distance for each copy, and I cannot control their alpha values individually.
Here's where it gets fun -
These projectiles also have homing capabilities, so the copies also need to follow the "path" of the original. As I mentioned above, in the other thread regarding dust, a ring array was used, but I'm not certain that would apply here. It has been suggested that I use Projectile.NewProjectile to spawn the copies using a List<> of the original's stored positions, and I like this idea, but I'm not sure this would be viable.
Whether this requires a list or an array, I need to be able to control not only the distance for each copy, but also the alpha value per copy. Unfortunately, I don't think I can use dust in this particular situation, as the projectile has a distinct shape, so the shape needs to rotate with the original.