OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Nobby on 19 Jan 2003, 17:08:49

Title: setting a units angle
Post by: Nobby on 19 Jan 2003, 17:08:49
Here's what i've just found out;
if you place a unit in an armoured MG, the M2 for example, using the "getpos" commands for elevation whilst on a hill, then the unit will face downwards in the direction of the hill.
What I want to be able to do is to set the angle of the unit so that they are facing forward and not down.
Is this possible and how?

Cheers.
Title: Re:setting a units angle
Post by: uiox on 19 Jan 2003, 19:41:14
May be this?

obj setDir heading
Operand types:
    obj: Object
    heading: Number
Type of returned value:
    Nothing
Description:
    Set object heading. Accepted heading range is 0 to 360.

Example:
    player setDir 180