Skip to content

Posts from How do I add spell effects to a map?

No ratings yet — be the first to rate!
User Avatar
11 years ago
Auto-translated
I need to have an effect from a spell playing in a specific location on the map, preferably continuously, and even better if it triggers when you approach it, etc., but that's a different story. For now, I just need to set up a spell effect at a location on the map so that it plays continuously. How do I do that?
User Avatar
11 years ago
Auto-translated
From the manual:
PlayVisualEffect
PlayVisualEffect — plays a defined visual effect (no sound) on the adventure map
Syntax
PlayVisualEffect(effectName, objectName="", tagName="",
x=0,y=0,z=0, rot=0, floor=0);
Description
Plays a visual effect with the specified name. The center of the effect is the position of the specified
object objectName with alteration x,y,z. The angle of the effect depends on the root object’s
angle with alteration of rot. If the root object is not defined (the parameter is left empty), then the video
effect is positioned on the adventure map at coordinates x,y,z (the effect’s height is based on the
target map cell height + z), the map floor is defined by the parameter floor.
If the specified effect is defined as cyclic, then the parameter tagName is required to stop the
animation. The function StopVisualEffects stops playing video effects.
effectName – link to the effect’s resource
objectName – root object’s name (may not be defined)
tagName – effect’s script name, is required to control the effect, may not be defined (default)
x,y,z – effect coordinates (depends on the map or on the root object coordinates)
rot – effect’s rotation angle (depends on the root object angle or works independently)
floor – adventure map floor (used if no root object is defined), 0 - ground, 1 - subterrain
Example:
PlayVisualEffect("/Effects/_(Effect)/Spells/Slow.xdb#xpointer(/Effect)", hero, "", 0, 0, 0, 0, 0);
P.S. I was too lazy to look it up in the manual myself, so I found Dyrman's post

Statistics

Welcome our newest member: recijeb