MDL functions
Functions to tweak animation and other model related settings.
Mdl_ApplyOverlayMDS
Apply an animation overlay with overlay_name
for the specified npc
Parameters
var c_npc npc
NPC to apply the overlay tovar string overlay_name
Name of the animation overlay
Mdl_ApplyOverlayMDSTimed
Apply an animation overlay with overlay_name
for the specified npc
for duration
milliseconds
Parameters
var c_npc npc
NPC to apply the overlay tovar string overlay_name
Name of the animation overlayvar float duration
Overlay duration in milliseconds
Mdl_RemoveOverlayMDS
Remove the animation overlay overlay_name
from specified npc
Parameters
var c_npc npc
NPC to remove the overlay fromvar string overlay_name
Name of the animation overlay
Mdl_ApplyRandomAni
Assign a random animation ani2
to random animation list of animation ani1
Parameters
var c_npc npc
NPC owning the animationvar string ani1
The animation to assign random animation tovar string ani2
Animation to be assigned
Mdl_ApplyRandomAniFreq
Sets the random animation frequency for animation ani1
Parameters
var c_npc npc
NPC owning the animationvar string ani1
The animation to set the random frequencyvar float frequency
Number of seconds between random animations
Example
Mdl_SetModelFatness
Set the procedural model fatness
Parameters
var c_npc npc
NPC to apply the fatness tovar float fatness
Fatness value
Mdl_SetModelScale
Set model scale per axis
Parameters
var c_npc npc
NPC to apply the scale tovar float x
Scale along the x-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%var float y
Scale along the y-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%var float z
Scale along the z-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%
Mdl_SetVisualBody
Sets up the visual of an NPC
Parameters
var instance npc
NPC to be affectedvar string body_mesh
Mesh to be used as the body e.g.HUN_BODY_NAKED0
var int body_tex
Body texture assigned to this body meshvar int skin
Body texture variantvar string head_mesh
Head meshvar int head_tex
Head texturevar int teeth_tex
Teeth texturevar int armor_inst
Armor (C_ITEM
instance) to be equipped or-1
for no armor
Mdl_SetVisual
Set the animation set (also dictates models you can set using the Mdl_SetVisualBody
)
Parameters
var instance npc
NPC to apply the animation set tovar string animation_set
Name of the MDS file that contains the animation set
Mdl_StartFaceAni
Start a face animation
Parameters
var c_npc npc
NPC to apply the animation tovar string name
Animation namevar float intensity
Intensity of the animation 0.0 to 1.0var float holdtime
How long should the animation be held for-2
will use the MMS defined value, '-1' will make the hold time infinite
Mdl_ApplyRandomFaceAni
Start a random face animation
Parameters
var c_npc npc
NPC to apply the animation tovar string name
Animation namevar float timemin
Minimum time after which the ani should be started (in seconds)var float timeminvar
Minimum boundary variation (in seconds)var float timemax
Maximum time after which the ani should be started (in seconds)var float timemaxvar
Maximum boundary variation (in seconds)var float probmin
Probability (0.0 to 1.0) to choose the lower boundary time