EffectAreaOfEffect(int, string, string, string)
Returns a new effect object.
effect EffectAreaOfEffect( int nAreaEffectId, string sOnEnterScript = "", string sHeartbeatScript = "", string sOnExitScript = "" );
Parameters
nAreaEffectId
The ID of the Area of Effect
sOnEnterScript
The script to use when a creature enters the radius of the Area of Effect. (Default: "")
sHeartbeatScript
The script to run on each of the Area of Effect's Heartbeats. (Default: "")
sOnExitScript
The script to run when a creature leaves the radius of an Area of Effect. (Default: "")
Description
Create an Area Of Effect effect in the area of the creature it is applied to.If the scripts are not specified, default ones will be used.
Known Bugs
Using invalid scripts for sOnEnterScript, sHeartbeatScript, sOnExitScript will crash the game. If you want to the Area of Effect do nothing use "****" or point to an empty script.
Version
1.28
Example
int AOE_BOG_STINK = 1500; void main() { //Declare the Area Of Effect, assign it an ID, and tell it what scripts to run when someone interacts with it. effect eAOE = EffectAreaOfEffect(AOE_BOG_STINK, "bog_on_enter", "bog_on_hb", "bog_on_exit"); location lTarget = GetLocation(GetEnteringObject()); int nDuration = 2; //Create an instance of the AOE Object using the Apply Effect function ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration)); }
See Also
functions: | ApplyEffectAtLocation |
categories: | Effects Functions | Spells Functions | Traps Functions |
author: John Shuell, editor: Charles Feduke, additional contributor(s): Peter Poe
Send comments on this topic.