setDir: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(+ note)
mNo edit summary
Line 12: Line 12:
____________________________________________________________________________________________
____________________________________________________________________________________________


| object '''setDir''' heading |= Syntax
| [[Object#Unit|Unit]]'''setDir''' heading |= Syntax


|p1= object: [[Object]] |= Parameter 1
|p1= heading: [[Number]]  
 
|p2= heading: [[Number]] |= Parameter 2


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1 = <code> soldier1 '''setDir''' 45 </code>
|x1 = <code> _soldier1 '''setDir''' 45 </code>
Will set soldier1 to face North East
Will set soldier1 to face North East
|x2 = <code>soldier1 '''setDir''' -675</code>
|x2 = <code>_soldier1 '''setDir''' -675</code>
Will also set soldier1 to face North East
Will also set soldier1 to face North East



Revision as of 09:07, 30 August 2007

Hover & click on the images for description

Description

Description:
Sets object heading. Angles are measured in degrees clockwise from north. The accepted heading range is from 0 to 360 Negative angles represent a counter-clockwise angle and the angle can be of any size.
Groups:
Uncategorised

Syntax

Syntax:
UnitsetDir heading
Parameters:
heading: Number
Return Value:
Nothing

Examples

Example 1:
_soldier1 setDir 45 Will set soldier1 to face North East
Example 2:
_soldier1 setDir -675 Will also set soldier1 to face North East

Additional Information

See also:
getDir

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

Notes

Posted on May 9, 2007 - 20:43 CET
Manny
Though effects of this command remain local, you can do a setPos afterwards to synchronize the direction on all machines in MP. myObj setDir 90; myObj setPos getPos myObj;

Bottom Section