Projectile fading away & WeaponModRange increase

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Projectile fading away & WeaponModRange increase

Postby WeeCrab » Sun Feb 28, 10 4:16 am

I'm working on a simple modded weapon for someone, which is an energy weapon that fires, well, energy, and I wanted to make the projectile "fizzle away" after it traveled a certain distance. I'm not a very good modder but I managed to get THAT much done already. I have the projectile so it fizzles out and destroys itself when it reaches a distance of the AccurateRange property.

Here is the code for that (in the projectile)

Code: Select all
simulated function Tick(float deltaTime)
{
   local float dist;

   dist = Abs(VSize(initLoc - Location));
   if (dist >= (AccurateRange / 2))
   {
      ScaleGlow = (AccurateRange - dist) / (AccurateRange / 2);
   }
   if (dist >= (AccurateRange)) Destroy();
}


what this means is once its distance traveled is *half* of it's accuraterange, it *starts* to fade, and once its distance reaches the accuraterange, it has faded away completely and deleted itself.

My problem is - if I use a weaponmodrange on the weapon to increase the range (accuraterange is actually the property that weaponmodranges increase, apparently, and maxrange stays the same forever), it won't update the projectiles accuraterange to make them shoot farther. That is - the weapon shoots them 75 feet exactly and the projectiles fade out with NO range mods installed, and still shoots them only 75 feet exactly with FIVE range mods installed.

I also noticed that adding range mods to the dx flamethrower doesn't actually make it shoot any farther, even though it lets you add range mods to it. :/

Any way around this problem? I need the updated/increased AccurateRange property of the weapon to update on its projectiles. Thanks for any advice
WeeCrab
Newbie
 
Posts: 43
Joined: Wed Jul 29, 09 6:10 am

Return to Editing issues

Who is online

Users browsing this forum: No registered users and 9 guests
cron