Full Version : XmlAnimate Attachment
xmlspawner >>XMLSpawner Attachments >>XmlAnimate Attachment
<< Prev | Next >>
ArteGordon- 08-21-2006
The XmlAnimate attachment will allow you to cause mobiles to perform an animation.
The animation can be triggered by nearby movement, speech, or can be manually activated.
All properties of an animation can be specified including the animation value, speed, direction, and repetition.
The animation can also be programmed to loop a given number of times at a given interval.
The constructors available are
public XmlAnimate()
public XmlAnimate(int animation)
public XmlAnimate(int animation, double refractory)
public XmlAnimate(int animation, int framecount, double refractory)
public XmlAnimate(int animation, double refractory, int loopcount, int loopdelay)
public XmlAnimate(int animation, int framecount, double refractory, int loopcount, int loopdelay)
the refractory period is the minimum interval in seconds between animation triggering.
the framecount is the number of frames in the animation.
By default, the attachment is proximity triggered with a range of 5 tiles. To change this, you can set the ProximityRange property.
To add speech activation (disabled by default), you would specify the ActivationWord property.
For example, to make a hind that will perform the death animation when you say the word "die", spawn it like this
hind/ATTACH/<xmlanimate,8/activationword/die>
You can specify a loopcount and loopdelay that will set the number of times an animation is performed when triggered.
hind/ATTACH/<xmlanimate,8/activationword/die/loopcount/3/loopdelay/2>
will cause the hind to perform the death animation 3 times with a delay of 2 seconds between repetitions.
Other properties that are available include the Forward property, that specifies whether to play the animation in the forward or reverse direction.
hind/ATTACH/<xmlanimate,8/activationword/die/forward/false>
would cause it to perform a reverse death animation.
The animation can also be manually triggered by setting the DoAnimate property to true.
An animation can be halted by setting the DoReset property to true.
As a tip, you may wish to freeze the mobile before forcing the animation so that the AI driven animations for walking or fidgeting dont interfere.
XavierWER- 08-21-2006
sweet, thanks alot arte!
godfood- 08-24-2006
Is there a way to use this to tell a mob to play frame's 1 - 10 and then back to 1 indefinately?
ArteGordon- 08-24-2006

QUOTE (godfood @ August 24, 2006 03:07 am)
Is there a way to use this to tell a mob to play frame's 1 - 10 and then back to 1 indefinately?

experiments with the repeat (default=false) and repeatcount (default=1)
hind/ATTACH/<xmlanimate,1/activationword/die/repeat/true/repeatcount/10>
and then combine this with the loop and loopdelay