lightAttachObject: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(60 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |game1= ofpe | ||
|version1= 1.00 | |||
|1.00 | |game2= arma1 | ||
|version2= 1.00 | |||
| | |game3= arma2 | ||
| | |version3= 1.00 | ||
| | |game4= arma2oa | ||
|version4= 1.50 | |||
| | |game5= tkoh | ||
|version5= 1.00 | |||
| | |game6= arma3 | ||
|version6= 0.50 | |||
| | |||
| | |gr1= Lights | ||
|arg= global | |||
|eff= local | |||
|descr= Attach light to given object at given position on object. | |||
|s1= light [[lightAttachObject]] [object, position] | |||
|p1= light: [[Object]] | |||
|p2= object: [[Object]] | |||
|p3= position: [[Array]] format [[Position]] | |||
|r1= [[Nothing]] | |||
|x1= <sqf>myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];</sqf> | |||
|seealso= [[setLightAmbient]] [[setLightBrightness]] [[lightDetachObject]] [[setLightColor]] [[setLightIntensity]] [[setLightAttenuation]] [[setLightUseFlare]] [[setLightFlareSize]] [[setLightFlareMaxDistance]] [[setLightDayLight]] [[attachObject]] [[attachTo]] [[attachedObjects]] [[attachedTo]] [[waypointAttachVehicle]] [[waypointAttachedVehicle]] [[triggerAttachVehicle]] [[attachedObject]] | |||
}} | }} | ||
{{Note | |||
|user= Feersum | |||
|timestamp= 20061201164200 | |||
|text= Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint"<br> | |||
for example: | |||
Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint" | <sqf> | ||
<br>for example: | _light = "#lightpoint" createVehicleLocal pos; | ||
< | _light setLightBrightness 1.0; | ||
_light | _light setLightAmbient [0.0, 1.0, 0.0]; | ||
_light | _light setLightColor [0.0, 1.0, 0.0]; | ||
_light | _light lightAttachObject [_object, [0,0,0]]; | ||
_light | </sqf> | ||
</ | }} | ||
{{Note | |||
|user= Waffle SS. | |||
|timestamp= 20150331044900 | |||
|text= When attached, movement is slow to update (jumpy). Use [[attachTo]] when attaching a light to moving objects. | |||
}} | |||
When attached, movement is slow to update (jumpy). Use [[attachTo]] when attaching a light to moving objects. | |||
Latest revision as of 16:45, 15 August 2022
Description
- Description:
- Attach light to given object at given position on object.
- Groups:
- Lights
Syntax
- Syntax:
- light lightAttachObject [object, position]
- Parameters:
- light: Object
- object: Object
- position: Array format Position
- Return Value:
- Nothing
Examples
- Example 1:
- myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];
Additional Information
- See also:
- setLightAmbient setLightBrightness lightDetachObject setLightColor setLightIntensity setLightAttenuation setLightUseFlare setLightFlareSize setLightFlareMaxDistance setLightDayLight attachObject attachTo attachedObjects attachedTo waypointAttachVehicle waypointAttachedVehicle triggerAttachVehicle attachedObject
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Dec 01, 2006 - 16:42 (UTC)
-
Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
for example:_light = "#lightpoint" createVehicleLocal pos; _light setLightBrightness 1.0; _light setLightAmbient [0.0, 1.0, 0.0]; _light setLightColor [0.0, 1.0, 0.0]; _light lightAttachObject [_object, [0,0,0]];
- Posted on Mar 31, 2015 - 04:49 (UTC)
- When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Lights
- Scripting Commands: Local Effect