Actions

Parent : mud

Attributes that tell the mud client what to do if the mud triggers an action such as {odog,afart}. Refer to actions on objects for more general information

ACTIONTYPE

unlimited ACTIONTYPE elements

name string
Is the 'actiontype' that matches to an object. Each object can reference a different set of action types.

ACTION

unlimited ACTION elements
action string
The action string that will match the action from the mud 3dtags. For example if the action from the mud is 'odog,afart' then will match 'afart' to the action in here.

sound string
Play a sound that matches this 'name' in sounds

effect string
Display an effect that matches this 'name' in effects.

animation string
If the action is performed on an actor (eg {oknight,ajump}) then will play the animation in actoranimations that matches this name.

turn string
Turns the object the specified angle. Useful for example to open and close a door.

object string
Display an object if the action occurs. Will match the string here to 'name' of an object in objectlist. To destroy the object after a few seconds use the object 'life' attribute. Can be useful for an explosion for example display an sprite with an explosion texture.

objectreplace string
Same as 'object' but instead of adding an object to the scene will replace the object that you are performing the action on. For example after a block of wood is split you could replace the unchopped block with a chopped model.

<ACTION action="achopped" sound="woodsplit" objectreplace="woodsplit"/>

speedover float
Instead of triggering an action by the mud specifying an action (eg odog,abark) can trigger an action by the object going over a certain speed. This is the speed in mud units per second in which the action is triggered.

Time Based Attributes


The following are attributes related to an object moving or scaling within a certain amount of 'time'.

positiontox, positiontoy , positiontoz float
Move the objects current position to this position relative to the current object position. Eg positiontoz="0.1" will move the object up 0.1 mud units.

positionfromx, positionfromy , positionfromz float
Initial position of the object relative to the initial position. Useful if creating an object and want it to move to its default position. For example give the appearance of a pentagram rising from the ground mud might specify:

{opentagram,arise,+}

The action might be:
<ACTION action="arise" positionfromz="-0.25" positiontoz="0" time="12"/>

scaleto float
Scale the object by this factor in 'time' seconds.

scalefrom float
As with 'positionfrom' is useful if creating an object and want it to grow into its specified scale. For example the demon wall grow from half size to full size in 1 second when its created:

{odemon,aspawn,+}

<ACTION action="aspawn" scalefrom="0.5" time="1" animation="awrithe" sound="demonbirth"/>

time float
The time taken to move or scale the object.