Friday, April 13, 2012

(FA) Resizing projectiles with a Unit script?

[:1]I was wondering, a New Unit I am making uses some Stock Projectiles, but they are too small for that particular Unit. Anyone know how to resize the projectiles for that unit only via unit script?|||Projectiles aren't typically one thing - they're a bunch of different emitters, and sometimes a mesh. One way or another, you would have to hook the projectile script to handle scaling of the projectile's emitters/trails/etc, and the only thing you can really scale from the unit script is the mesh (if any) using proj:SetDrawScale().|||So I couldnt use a script to resize a beam projectile? If I hooked the projectile itself, it would alter the projectile for all the units using it...|||There is no such thing as a beam projectile. lol. Weapons fire beams, or projectiles.
brandon007|||You could hook the projectile's script, providing class variables for each of the emitter tables it creates. This would leave the projectile at normal scale by default, but the weapon classes in your unit script can then use those emitter references to do ScaleEmitter calls after projectile creation.
However, at that point, you may as well just copy the projectile script+bp, and update any mesh references in the bp to point to the original location.

No comments:

Post a Comment