ads_event(placement)
Argument | Description |
---|---|
placement | The PlayHaven placement name (a string) |
Returns: N/A
This function will send an ad request to PlayHaven. The argument
that it takes is the placement name string that you wish to
use. If that placement is associated with any content from the
PlayHaven network (which you must have set up previously from the
PlayHaven dashboard - see here), an interstitial ad overlay will be shown. Some
of these ads generate a callback, which can be dealt with
from a script as defined by the function ads_set_reward_callback
.
You must have ads enabled and PlayHaven set up correctly in
the
Global Game Settings - Advertising Tab otherwise no ads will be
shown.
ads_set_reward_callback(scr_AdsCallback);
ads_event("game_start");
The above code will set the callback script and then request an ad from PlayHaven for the placement named "game_start".