Passer au contenu principal
Version: bleeding-edge 🩸

Animations de Rechargement d'Arme

Comment créer des animations personnalisées pour recharger les armes.

Maintenant il est possible de créer des animations de rechargement personnalisé pour nanos world! Pour que cela fonctionne, il vous suffit de configurer quelques notifications à l'endroit où vous souhaitez que le reload event se produise.

Étape 1 : Créez un montage d’animation avec votre animation

Pour cela, il vous suffit de faire un clic droit sur n'importe quelle séquence d'animation et de créer un nouveau montage d'animation comme ceci :

Étape 2 : Ajouter des notifications de montage au montage

En bas (là où se trouve la timeline), il est possible d'ajouter de nouvelles notifications d'animation ce sont des événements qui déclenchent des codes spéciaux pour gérer le rechargement.

Après avoir ajouté une notification, vous pouvez la déplacer où vous le souhaitez. Notez que vous pouvez définir son nom dans le coin supérieur droit :

Étape 3 : Définir le nom correct

Certains noms spécifiques peuvent y être utilisés pour déclencher des actions particulières lors du rechargement de l'arme

Notify NameDescription
Reload_LoadIl s'agit de la notification principale, qui déclenchera la fonction de rechargement interne et mettra à jour les munitions de l'arme. Cela détruira le Magazine StaticMesh généré dans la main gauche.
Reload_UnloadThis will hide the Weapon's b_gun_mag bone and spawn a Magazine StaticMesh attached to the left hand.
The magazine mesh can be set with Weapon:SetMagazineMesh().
Reload_UnloadAndDetachThis will hide the Weapon's b_gun_mag, spawn the Magazine StaticMesh at the bone location and immediately detach it.
Reload_SpawnMagazineCela fera simplement apparaître le Magazine StaticMesh attaché à la main gauche.
Reload_DropMagazineCela fera tomber le Magazine StaticMesh de la main gauche.

Examples

On Shotguns or Revolvers, you usually will have only Reload_Load being called, as you don't have Magazine StaticMeshes and is only adding new bullets into it.

On Pistols, you may want to call Reload_UnloadAndDetach, Reload_SpawnMagazine and Reload_Load respectively to just release the Magazine from the weapon, then spawn a new one in the hand and finally do the load.

On Rifles, you may want to call Reload_Unload, Reload_DropMagazine, Reload_SpawnMagazine and Reload_Load respectively to hide and spawn a Magazine in the left hand, then after few ms drop it (throwing it back), then spawning a new Magazine in the hand and attaching it to the weapon finishing the load.