Home   Help Search Login Register  

Author Topic: Lit Searchlight with Game Logic?  (Read 2328 times)

0 Members and 1 Guest are viewing this topic.

Offline syrion

  • Members
  • *
Lit Searchlight with Game Logic?
« on: 11 Jul 2009, 23:43:08 »
I would like to have empty, stationary searchlights to illuminate a checkpoint.  (The illuminant tower would be cool, but I haven't found a way to turn its lights on.)

Trouble is, the ArmA 1 editing guide says that I can create a Game Logic and then use "moveInGunner" to move it into a searchlight--but it doesn't work.  I put "this moveInGunner light" in its initialization, but the light remains stubbornly unlit and empty.  I even tried using a very old searchlight script I found by searching these forums, but it was a no go.

How can I accomplish this?  Are there other options for semi-permanent illumination?

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Lit Searchlight with Game Logic?
« Reply #1 on: 12 Jul 2009, 00:40:25 »
You can no longer put anything except men into vehicles. No workaround known yet...

Either put a real soldier into the light (not what you want, but not much else you can do) or place light sources at the appropriate position.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline syrion

  • Members
  • *
Re: Lit Searchlight with Game Logic?
« Reply #2 on: 12 Jul 2009, 01:03:10 »
Well, that's just irritating.  Is there any way to get the illuminant towers (or some other object) to light up, so it's not just a phantom light shining from nothingness?

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Lit Searchlight with Game Logic?
« Reply #3 on: 12 Jul 2009, 11:26:50 »
Yes there are numerous ways. Try this script:
Code: [Select]
_light = "#lightpoint" createVehicle getpos lightspot1;
_light setLightBrightness 0.05;
_light setLightAmbient[1.0, 1.0, 1.0];
_light setLightColor[1.0, 1.0, 1.0];
_light lightAttachObject [lightspot1, [0,0,4]]

_light = "#lightpoint" createVehicle getpos lightspot2;
_light setLightBrightness 0.05;
_light setLightAmbient[1.0, 1.0, 1.0];
_light setLightColor[1.0, 1.0, 1.0];
_light lightAttachObject [lightspot2, [0,0,4]]

_light = "#lightpoint" createVehicle getpos lightspot3;
_light setLightBrightness 0.05;
_light setLightAmbient[1.0, 1.0, 1.0];
_light setLightColor[1.0, 1.0, 1.0];
_light lightAttachObject [lightspot3, [0,0,4]]

Place three objects in the nighttime editor and name them lightspot1, lightspot2 and lightspot3 respectively. Execute the above script and watch them light up the ground around them. Three versions are attached. If you like one of them, fiddle with the settings found in these lines

Code: [Select]
_light setLightAmbient[1.0, 1.0, 1.0];
_light setLightColor[1.0, 1.0, 1.0];

None of the lights are cone shaped, however. I don't now how to accoplish that. But they are perfect for lighting up towers, areas or whatever. If you are using the lightpoint in a MP game, you must make sure the script runs on all clients. The light created is otherwise local to the machine where it is currently running and all other players will remain in darkness.
OFPEC | Intel Depot
RETARDED Ooops... Retired!