Since engine version: 5.1 OC
Creates an effect. Returns the effect if successful or
nilif 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
proplist AddEffect(string name, object target, int priority, int timer, object command_target, id command_target_id, any var1, any var2, any var3, any var4);
- Name of the effect without prepended 'Fx'.
- [opt] Target object for the effect. If
Globalis used, but the target parameter of the callbacks will get
- Effect priority. Must be greater than zero.
- [opt] 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.
- [opt] 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.
- [opt] 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.
- [opt] First extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
- [opt] Second extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
- [opt] Third extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
- [opt] Fourth extra parameter to be passed to Fx*Start and Fx*Effect callbacks.
For examples and more information see the effects documentation.