lightAttachObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also)
m (Some wiki formatting)
 
(72 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= ofpe
|version1= 1.00


|1.00|= Game version
|game2= arma1
|version2= 1.00


|arg= global |=
|game3= arma2
|eff= local |= Effects in MP
|version3= 1.00
____________________________________________________________________________________________


| Attach light to given object at given position on object. |= Description
|game4= arma2oa
____________________________________________________________________________________________
|version4= 1.50


| light '''lightAttachObject''' [object, position] |= Syntax
|game5= tkoh
|version5= 1.00


|p1= light: [[Object]] |= Parameter 1
|game6= arma3
|p2= [object, position]: [[Array]] |= Parameter 2
|version6= 0.50
|p3= object: [[Object]] |= Parameter 3
|p4= position: [[Array]] - format [[Position]] |= Parameter 4


| [[Nothing]] |= Return value
|gr1= Lights
____________________________________________________________________________________________
|x1=<code>myLight '''lightAttachObject''' [myVehicle, [-0.5,-0.25,1]];</code>|=
| --- LightSource Category ---<br>[[setLightAmbient]], [[setLightBrightness]], [[lightDetachObject]], [[setLightColor]], [[setLightIntensity]], [[setLightAttenuation]], [[setLightUseFlare]], [[setLightFlareSize]], [[setLightFlareMaxDistance]], [[setLightDayLight]]<br><br>
  --- Attach Category ---<br>[[attachObject]], [[attachTo]], [[attachedObjects]], [[attachedTo]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[triggerAttachVehicle]], [[attachedObject]] |= See also


|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]]
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= Feersum
<!-- Note Section BEGIN -->
|timestamp= 20061201164200
<dd class="notedate">Posted on Dec 1, 2006 - 16:42
|text= Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint"<br>
<dt class="note">'''[[User:Feersum|Feersum]]'''<dd class="note">
for example:
Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint"
<sqf>
<br>for example:
_light = "#lightpoint" createVehicleLocal pos;
<code>_light = "#lightpoint" [[createVehicleLocal]] pos;
_light setLightBrightness 1.0;
_light [[setLightBrightness]] 1.0;
_light setLightAmbient [0.0, 1.0, 0.0];
_light [[setLightAmbient]] [0.0, 1.0, 0.0];
_light setLightColor [0.0, 1.0, 0.0];
_light [[setLightColor]] [0.0, 1.0, 0.0];
_light lightAttachObject [_object, [0,0,0]];
_light [[lightAttachObject]] [_object, [0,0,0]];
</sqf>
</code>
}}
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
{{Note
[[Category:Scripting Commands|LIGHTATTACHOBJECT]]
|user= Waffle SS.
[[Category:Scripting Commands OFP Elite |LIGHTATTACHOBJECT]]
|timestamp= 20150331044900
[[Category:Scripting Commands ArmA|LIGHTATTACHOBJECT]]
|text= When attached, movement is slow to update (jumpy).  Use [[attachTo]] when attaching a light to moving objects.
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:45, 15 August 2022

Hover & click on the images for description

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
Feersum - c
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]];
Waffle SS. - c
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.