Author Topic: How to move a light  (Read 1038 times)

I create a light like this:


datablock fxLightData(playerFlashlightData : playerLight) {
   uiName = "";
   flareOn = 0;

   radius = 10; // 10
   brightness = 3;
};


...
   %light = new fxLight() {
      datablock = playerFlashlightData;
      iconSize = 1;

      player = %player;
      enable = 1;
   };
...


How do I move it?

I tried:

%light.settransform()
%light.position =

%light.inspectpostapply() crashes dedicated servers so can't be used

you could mount it to a bot or projectile and move that around, but I'm assuming that you want a more efficient method, I will try to help you when I get home

You have to call fxLight.reset(); after moving the light. I wouldn't recommend doing this to create the illusion of motion, though. Never tried it, but the fact that you HAVE to call a function to tell it to move isn't a good sign.

EDIT: Oh wait, yes I have. The Star Trek phasers I made do this.
« Last Edit: September 01, 2013, 11:58:15 PM by Xalos »

fxLight.reset();

Thanks a ton for that. I'm sure I would have found it if I looked through an object dump but I didn't have time for that yesterday, where I needed it for something.

Does you want the light move alike the emitters have move around, like swirls moment something like that?