Author Topic: Creating a light?  (Read 567 times)

Should this be working? It doesn't for me
Code: [Select]
function RocketlauncherProjectile::onCollision(%this, %obj, %col)
{
%l = new (fxlight)() 
   {


                  Position  = %pos;
          LightOn = true;
radius = 30;
brightness = 30;
color = "1 0.5 0 1";

flareOn = true;
flarebitmap = "base/lighting/corona2";
NearSize = 30;
FarSize = 30;

     };
MissionCleanup.add(%l);
}
« Last Edit: June 02, 2009, 02:11:23 PM by Stratofortress »




Try this on for size (or just to see if it works)
Code: [Select]
function RocketlauncherProjectile::onCollision(%this, %obj, %col)
{
%l = new fxlight(); 
   {


                  Position  = %pos;
          LightOn = true;
radius = 30;
brightness = 30;
color = "1 0.5 0 1";

flareOn = true;
flarebitmap = "base/lighting/corona2";
NearSize = 30;
FarSize = 30;

     };
MissionCleanup.add(%l);
}

new FXlight(light)
{
datablock = "redlight";
}

shouldnt it be %this %obj %col %fade %pos %normal, not just %this %obj %col?  Also, all you need after position is the datablock.

Should this be working?


function RocketlauncherProjectile::onCollision(%this, %obj, %col)
         %l = new (fxlight)() 

what error does it give? because i think it has to do with that extra set of parenthesis