# ChangeEffect

Effects
4.9.5.0 CE
bool
string name Name of the effect without preceding 'Fx'. You can use '*' and '?' wildcards.
object target Targt object in which to change effects. With 0, the global effects are processed.
int index Effect index. If name is given then if there are more effects matching the search mask the one with the given index is refered to. If name is not given then the effect with the correspoding effect number will be changed. For indices it is guaranteed that, in contrast to effect numbers, they start at 0 and count up to the number of effects
string new_name New effect name without prepended 'Fx'.
int new_timer New timer interval. If -1, the previous value will be kept. Otherwise, this call will also reset effect time.
Changes the name of an effect. This also affects the names of the related callback functions.
ChangeEffect("MeinEffekt", 0, 0, "AndererEffekt");
Renames the global effect "MyEffect" (if it exists) to "OtherEffect".
var obj, i, effect; while ((i=0) || obj=FindObject(0, 0,0,0,0, 0, 0,0, 0, obj)) while (effect = GetEffect("*Fire*", obj, i)) ChangeEffect(0, obj, i++, GetEffect(0, obj, index, 1), 2);
Switches all fire into fast mode.
Effects Documentation
AddEffect
CheckEffect
GetEffectCount
EffectCall
EffectVar
GetEffect
RemoveEffect
Sven2
2004-03