# AddEffect

Effects
5.1 OC
proplist
string name Name of the effect without prepended 'Fx'.
object target Target object for the effect. If `nil`, a global effect is created.
int priority Effect priority. Must be greater than zero.
int timer Interval for the timer calls. With `nil`, no timer calls are made and the effect stays on permanently until it is deleted by other calls.
object command_target Command target. If specified, all callbacks are executed in this object. Otherwise the callbacks are made without any object context. If the command target object is deleted, all effects belonging to this object are deleted without any further callbacks. If the target object changes its definition, belonging effects should reassign their callback functions using `effect.Name = effect.Name`.
id command_target_id Definition in which callbacks are to be executed if no command target object is specified. If both command_target and command_target_id are `nil`, callbacks are made globally. For this, the Fx* must also be declared globally or they must be engine functions.
any var1 First extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
any var2 Second extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
any var3 Third extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
any var4 Fourth extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
Creates an effect. Returns the effect if successful or `nil` if not (e.g. because the effect was rejected). If the effect was accepted by another effect which is deleting itself within the same call, the return value is probably `nil`.
For examples and more information see the effects documentation.
Effects Documentation
CheckEffect
GetEffectCount
EffectCall
GetEffect
RemoveEffect
Sven2
2004-03