Home   Help Search Login Register  

Author Topic: Light cones?  (Read 4784 times)

0 Members and 1 Guest are viewing this topic.

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Light cones?
« on: 10 Jul 2009, 03:46:38 »
How would someone make a light cone on a vehicle?  I've tried useing the "create lightpoint" thing, but i guess that can only be a light point and not a cone.  Will I have to make my own light cone like a street lap and attach it to my vehicle?

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Light cones?
« Reply #1 on: 10 Jul 2009, 12:48:22 »
You just mean a normal headlamp ?
Opening the the BIS sample files HMMWV I can see in the Memory LOD the following named points;

L svetlo (left lamp, point close to vehicle)
konec L svetla  (left lamp, point out from vehicle in direction of light)

P svetlo (right lamp, point close to vehicle)
konec P svetla  (right lamp, point out from vehicle in direction of light)

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #2 on: 07 Aug 2009, 06:40:55 »
No, I mean a light cone independent of the vehicles headlights that you can turn on and off.  I'm trying to figure this out cause I want to add "Alley Lights" to my police car, which will come in handy when you're driving through a city at night and you want to look down a dark alley without having to turn your car into the alley.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Light cones?
« Reply #3 on: 07 Aug 2009, 12:43:41 »
Gnat has already said how to do it.

Being able to move the light cone like a searchlight would be another matter though, would probably need a turret definition on the vehicle model for that.

Planck
« Last Edit: 07 Aug 2009, 12:45:32 by Planck »
I know a little about a lot, and a lot about a little.

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #4 on: 07 Aug 2009, 17:09:27 »
No, I am not talking about the vehicle's own leadlamps that use konec L/P svetla that you can turn on useing the L key.  As far as I understand, konec L/P svetla is only used for the vehicle's natural headlamp.

For the "Alley Lights" and the "Take Down" lights that are on the lightbar to work correctly, they can not use the vehicle's own headlamps.  You have to be able to turn them on and off independtly of the vehicle's headlamps.

My best guess is to make a invisible street lamp or something like it and attach it to the car.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Light cones?
« Reply #5 on: 07 Aug 2009, 17:25:47 »
You can call your new lamps anything you want, it doesn't have to be L svetlo /konec L svetla or P svetlo /konec P svetla.

Turning them on will depend on your user action parameters that you set up for the model.

Well, never mind, good luck getting a streetlamp light cone to shine horizontally.


Planck
I know a little about a lot, and a lot about a little.

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #6 on: 07 Aug 2009, 17:43:49 »
That doesn't make sense.  You are saying to use the reflector class to create a light cone, correct.  But then when you turn on the vehicle's normal lights, these extra lights will turn on also.  I do not want that.  I want seperate user actions for these extra lights.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Light cones?
« Reply #7 on: 08 Aug 2009, 04:17:50 »
Do what I did with the landing light on the Su33, animate the light points using the HIDE animation.
i.e. the user command hides and unhides the alley light points.
Obviously the alley light will only work once the main headlights are on.

Model.cfg
---------
         class LightHide
         {
            type ="hide";
            source="UserLight";
            selection="LightHide";
            hideValue = 0.1;
         };
         class Light_1_Hide: LightHide
         {
            selection="light_Source1";
         };
         class Light_2_Hide: LightHide
         {
            selection="light_Target1";
         };

Config.cpp
----------
      class AnimationSources
      {
         
         class  UserLight
         {
            source = "direct";
            initPhase=0;
            sourceAddress="clamp";
         };

Script or class UserActions
-------------------------
_this select 0 animate ["LightHide",0];

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #8 on: 08 Aug 2009, 15:57:38 »
Very interesting  :scratch:  Gnat...that has to be the up most ghetto, most cheesy way of adding Alley Lights and TakeDown Lights.  I like it!  You may have just given me an idea on how to fix the door locking problem also.  Thanks!

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Light cones?
« Reply #9 on: 08 Aug 2009, 17:58:35 »
Think outside of the box and ArmA will usually reward you ............

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Light cones?
« Reply #10 on: 09 Aug 2009, 13:59:38 »
 The easiest way is to add a turret as already mentioned. Searchlight is actually a weapon that is turned on and off by firing the weapon.
 I have used it on several vehicles  simply copy the searchlight from the mlods and scale it to fit your vehicle .

 and add the turret in the model .cfg and the cpp.


 
Code: [Select]
class Turrets  {

class LeftDoor_Gun  : NewTurret {
startEngine = false;
outGunnerMayFire = true;
primaryGunner = 1;
body = "LeftGun_Turret";
gun = "LeftGun";
animationSourceBody = "LeftGun_Turret";
animationSourceGun = "LeftGun";
commanding = -1;
proxyIndex = 1;
gunnerName = "Spotter";
memoryPointsGetInGunner = "pos_gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
memoryPointGun = "machinegun";
memoryPointGunnerOptics = "gunnerview_1";
memoryPointGunnerOutOptics = "gunnerview_1";
gunBeg = "end"; // endpoint of the gun
gunEnd = "chamber_1"; // chamber of the gun
selectionFireAnim = "zasleh";
gunnerAction = "UH60_Gunner";
gunnerInAction = "UH60_Gunner";
weapons[] = {Searchlight};// here is the weapon searchlight
magazines[] = {};
minElev=-10;
minTurn=-180; maxTurn=+180; initTurn=0;
gunnerOpticsModel = "\ca\weapons\optika_empty";
gunnerForceOptics = True;


};
};
I love ofp

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #11 on: 10 Aug 2009, 05:07:25 »
@DeanosBeano, from my understanding, a turret that is useable by the driver would mean everytime you steer, the turret will follow, which I want to aviod.  The Alley and Take down lights more than make up for it however.  If you are experianced with turret class, configs and animations, I'd like to ask you for some help with a very special project.

@Gnat, thanks!  I implemented this feature the other day and my car changed dramatically at night.  This new update for the cars will leave many breathless.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Light cones?
« Reply #12 on: 10 Aug 2009, 12:28:47 »
 Normally the Passenger uses the searchlight in my addons , but for driver use , you simply apply the source as "user" in the model.cfg this allows you to use Keydown to operate the turret when your driver. when applying the user source you simply require a script ,that when _x button is pressed turret turns by .1 of a degree or .01 depending on what speed you set the animation. simialryl you define other leys for - degree and two more for up down angle.
 it seems you have found a way using gnats and this maybe over complicated for your needs though, however its always a good thing to know for future.

I love ofp

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re: Light cones?
« Reply #13 on: 19 Aug 2009, 04:59:16 »
Well Gnat, it was worth a try, but when ever I turn the lights on for the car, the red, white and blue lights created by the lightbars and stuff don't show anymore.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Light cones?
« Reply #14 on: 19 Aug 2009, 14:58:00 »
Well, that should be unrelated. Its possibly a model.cfg problem or a named selection issue.
Would need a couple more details to help ........