Thread: Vector
View Single Post
Old 10-24-2011, 10:52 AM   #49
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

Collapse Zinc:
static method createFromUnit(unit whichUnit, real heightOffset) -> vector
{
    vector v = vector.allocate();
    real x = GetUnitX(whichUnit), y = GetUnitY(whichUnit);
    MoveLocation(thistype.loc, x, y);
    v.x = x;
    v.y = y;
    v.z = GetUnitFlyHeight(whichUnit) + GetLocationZ(thistype.loc) + heightOffset;
    return v;
}

Something along those lines.
BBQ is offline   Reply With Quote