Both skeletal and vertex animated meshes can use anim notifies, however, vertex anim notifies must be set up via UnrealScript when the model is first imported into the package. Skeletal mesh anim notifies can be set up at any time in the Animation Browser (do not modify default packages!).
Anim Notifies can be used to produce an action at a specific time frame of animation. Vertex animated notifies can only be used to execute an UnrealScript function, however the function itself could then be used to spawn an effect or play a sound etc… The skeletal mesh notifications can be used to execute 8 different types of effects or actions including playing sounds, spawning effects and executing UnrealScript functions. This is especially useful when working with monsters as it allows us to spawn projectiles and other effects when the monster plays the correct animation sequence.
Anim notifies are commonly used to play sounds when feet “touch” the ground. Monsters can also use this to make them more realistic.
To use anim notifies with Vertex Meshes you need to include the information with the model and animation files when they are first imported. When importing the files simply add the following lines after the #Exec MESH SEQUENCE commands. Vertex Mesh Import Commands
#Exec MESH NOTIFY parameters:
MESH | The name of the mesh the sequence resides in, which we wish to add a notify for. | Optional: No |
SEQ | The name of the sequence we want to create a notify for. | Optional: No |
TIME | This is where to place the notify. The range is 0 to 1. To find the correct value the math is:Frame / TotalFramesSo if you wanted to place a notify on frame 1.58 (of a 26 frame total animation) you would put 0.06. | Optional: No |
FUNCTION | The name of the function that will be called for this notify. This function should exist within the actor that has this mesh when its drawtype is DT_Mesh. | Optional: No |
#Exec MESH NOTIFY MESH=MyMesh SEQ=Attack02 TIME=0.5 FUNCTION=FireProjectile
Anim notifies are set at specific times during the animations in the animation browser. These notifies call special events.
Notify Types Overview
Variable
|
Description
|
DataType
|
EffectClass | Effect class type to spawn | Class (Actor) |
Bone | Name of the bone to attach to, or spawn at (if any) | Name |
OffsetLocation | Offset from the actor’s location (or bone) | Vector |
OffsetRotation | Offset from the actor’s rotation (or bone) | Rotator |
Attach | Whether or not to attach to the bone | Boolean |
Tag | Tag to use on the effect (for later destroying) | Name |
DrawScale | Scale of the effect | Float |
DrawScale3D | Axis scale of the effect | Vector |
Variable
|
Description
|
DataType
|
DestroyTag | Tag of the effect to destroy (set by AnimNotify_Effect) | Name |
bExpireParticles | If effect is an emitter let all particle die before destroying | Boolean |
Variable
|
Description
|
DataType
|
Sound | Name of the sound to be played | Sound |
Volume | Volume of the sound | Float |
Radius | Radius of the sound | Integer |
Variable
|
Description
|
DataType
|
NotifyName | Name of the script function to call | Name |
Variable
|
Description
|
DataType
|
SubAction | Matinee subaction to perform | MatSubAction (editinline) |
Variable
|
Description
|
DataType
|
EventName | Name of the actor’s tag that you wish to trigger | Name |
The remaining 2 notify types (LIPSinc and FireWeapon) can be ignored. They were most likely created specifically for some matinees.
For more information read this page. AnimNotifies – UDN
For this tutorial I will be using the Magdalena skeletal mesh and I will be making it call the FireProjectile function using an anim nofiy. Remember to rename and save your package to something unique or you will get version mismatch errors.
Adding a Notify
Open your desired animation file in the animation browser. Go to File>Open> open your new file. Next find the animation you want your monster/model to use when it fires its projectile. In this case for Magdalena I chose the “Gesture_Taunt01” animation.
//very simple rangedattack function simply showing the animation being played function RangedAttack(Actor A) { if ( bShotAnim ) { return; } bShotAnim=true; if ( Velocity == vect(0,0,0) ) { SetAnimAction('Gesture_Taunt01'); Controller.bPreparingMove = true; Acceleration = vect(0,0,0); } } function FireProjectile() { //spawn projectile }
So now whenever that animation is played it will try to call the FireProjectile function at the frame we specified. If the function doesn’t exist nothing will happen.
TIP – Don’t feed monsters after midnight!
Hi. I am having a trouble adding the so called animations notifier to my moded player character.
I took a ready player character, exported it and moded it in 3ds max, then I exported it to PSK file using ACtorX without any errors.
In the animationbrower. I click file> mesh import and I import this mesh file I created with actorx, and name the package “MyNewPackage” or something like that. Then in the right panel, I click on animations and I add the vanilla animation file from the game. Then I click the blue-ish button, “Attach animation to mesh”. Then UnrealEd loads all the animations in the list on the left, and I can play them without problem. But when I click on the Notify tab, its greyed out and I cannot click on the add button! Please help me. What I am doing wrong?
Hi I think I solved my problem. I guess for custom characters that use ONLY the vanilla game animations and information, theres no need to add these notify things. I will test this in the next few days and tell you what happened.
I am still waiting for your reply on this question, though.
Hi,
I’ve never seen that button greyed out before. But here’s some advice:
Maybe the animation needs to be “linked” to the mesh first by clicking the “link to mesh” button (that might be the button you described above). If you’re linking the default animations then all of the animnotifies the game uses should already be there and you won’t need to add any (unless you want custom events). If you did want custom notifies then you would need to re-import the default animations as a “new” animation set into your package (probably a good idea to rename it too) and then once linked and saved it should allow you to add new ones. The reason for re-importing it as a new set is so that you don’t edit any of the default files or you won’t be able to play online.
One thing I want to add is that if you are using an AnimNotify_Script, the function it calls cannot be replicated or else the notify won’t trigger during online play.