1
Modification Help / fxLight to follow shot projectile
« on: May 07, 2018, 04:44:20 PM »
The default projectile light is loving stuff and i want to attach an FX light onto a projectile or make it follow the projectile until it dies.
So far i've instantiated a new light under the "onFire" action of the weapon like this:
I've also tried using:
Any help?
So far i've instantiated a new light under the "onFire" action of the weapon like this:
Code: [Select]
%light = new fxlight()
{
dataBlock = BrightLight;
enable = true;
iconsize = 1;
position = %this.projectile.pos;
};
and i know that this doesnt copy the movement of the projectile but i've tried adding this line so it would get destroyed alongside the projectile:Code: [Select]
%light.attachToObject(%obj);
However, this causes new light to instantiate on the blockhead's left hand. This isnt the player flashlight because you can turn that on and off without affecting the other light.I've also tried using:
Code: [Select]
%this.projectile
but i dont know the syntax for it and wether it even has a position variable.Any help?