# SetAdvertLocationEx

## Description

Positions the advert created with CreateAdvert somewhere on screen and attempts to scale it to a certain width. Since the advert will have its own aspect ratio the height will be calculated from the width. This provides rough positioning by letting you choose between left, centered, or right justify for the horizontal and vertical positions. This is not guaranteed to work on all advert providers, currently only Inneractive can scale ads to a specific width.

## Definition

SetAdvertLocationEx( horz, vert, offsetx, offsety, width )

void agk::SetAdvertLocationEx( int horz, int vert, float offsetx, float offsety, float width )

## Parameters

- horz - The horizontal position of the ad, 0=left, 1=center, 2=right
- vert - The vertical postion of the ad, 0=top, 1=center, 2=bottom
- offsetx - when horz is equal to 0 or 2 this value offsets the ad from the specified edge
- offsety - when vert is equal to 0 or 2 this value offsets the ad from the specified edge
- width - The desired width of the ad, it will be scaled to this width