lightAttachObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Some wiki formatting)
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma1
|game1= ofpe
|version1= 1.00


|1.00
|game2= arma1
|version2= 1.00


|gr1 = Lights
|game3= arma2
|version3= 1.00
 
|game4= arma2oa
|version4= 1.50
 
|game5= tkoh
|version5= 1.00
 
|game6= arma3
|version6= 0.50
 
|gr1= Lights


|arg= global
|arg= global
Line 11: Line 25:
|eff= local
|eff= local


| Attach light to given object at given position on object.
|descr= Attach light to given object at given position on object.


| light [[lightAttachObject]] [object, position]
|s1= light [[lightAttachObject]] [object, position]


|p1= light: [[Object]]
|p1= light: [[Object]]
|p2= [object, position]: [[Array]]
|p3= object: [[Object]]
|p4= position: [[Array]] - format [[Position]]


| [[Nothing]]
|p2= object: [[Object]]


|x1=<code>myLight [[lightAttachObject]] [myVehicle, [-0.5,-0.25,1]];</code>
|p3= position: [[Array]] format [[Position]]


| [[setLightAmbient]], [[setLightBrightness]], [[lightDetachObject]], [[setLightColor]], [[setLightIntensity]], [[setLightAttenuation]], [[setLightUseFlare]], [[setLightFlareSize]], [[setLightFlareMaxDistance]], [[setLightDayLight]], [[attachObject]], [[attachTo]], [[attachedObjects]], [[attachedTo]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[triggerAttachVehicle]], [[attachedObject]]
|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]]
}}
}}


<dl class="command_description">
{{Note
<!-- Note Section BEGIN -->
|user= Feersum
<dd class="notedate">Posted on Dec 1, 2006 - 16:42
|timestamp= 20061201164200
<dt class="note">[[User:Feersum|Feersum]]<dd class="note">
|text= Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint"<br>
Light can be created with command [[createVehicleLocal]] with special vehicle class "#lightpoint"
for example:
<br>for example:
<sqf>
<code>_light = "#lightpoint" [[createVehicleLocal]] pos;
_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]];
</code>
</sqf>
<!-- Note Section END -->
}}
</dl>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{Note
{{GameCategory|ofpe|Scripting Commands}}
|user= Waffle SS.
{{GameCategory|arma1|Scripting Commands}}
|timestamp= 20150331044900
{{GameCategory|arma2|Scripting Commands}}
|text= When attached, movement is slow to update (jumpy).  Use [[attachTo]] when attaching a light to moving objects.
{{GameCategory|arma3|Scripting Commands}}
}}
{{GameCategory|tkoh|Scripting Commands}}
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on March 31, 2015 - 04:49 (UTC)</dd>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">
When attached, movement is slow to update (jumpy).  Use [[attachTo]] when attaching a light to moving objects.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

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.