> For the complete documentation index, see [llms.txt](https://missnohit.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://missnohit.gitbook.io/home/tutorials/dynamically-added-melee-weapon.md).

# Dynamically added melee weapon

In this tutorial, we'll guide you through the process of dynamically equipping a weapon with the Mnh Shape component during runtime.

Add Mnh Shape component to weapon actor to serve as the representation for the hitbox.

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2FCu8prINy8CmOKh7J4oxa%2FUntitled.png?alt=media&amp;token=e0c48f2d-b4f4-4f8a-ae7f-00fecd24e951" alt="" width="340"><figcaption></figcaption></figure>

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2F7vRxrNwmjvXIcDwgj1ej%2FUntitled.png?alt=media&amp;token=1a52e236-b3d6-45c5-b35c-49eeb2b7b252" alt="" width="280"><figcaption></figcaption></figure>

One second after the BeginPlay event, spawn the weapon actor and attach it to the "hand\_r" bone.

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2FqZnP8bZUMkq6KTaQysxi%2FUntitled.png?alt=media&amp;token=2fbc8afa-6a92-43f2-b325-ed8e88932940" alt=""><figcaption></figcaption></figure>

Designate weapon’s Mnh Shape Component as the Tracer Source and trigger “Start All Tracers Event” & Configure Tracer Source as Mnh Shape Component

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2FbjUkCCM1i4q4Rz3mbSZL%2FUntitled.png?alt=media&amp;token=1235df7c-3ed5-4e2a-9f22-8f99470aacdd" alt=""><figcaption></figcaption></figure>

Add Mnh Tracer to the Player Character & setup properties as follows

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2F6KU7JkJ0kww70m3DZUUE%2FUntitled.png?alt=media&amp;token=ff5af5d5-4c3f-4c53-a9a9-a70884596b41" alt=""><figcaption></figcaption></figure>

With the given configuration, your game will spawn a weapon actor one second after the BeginPlay event. The annotated HitBox on the weapon will serve as the Tracer source, enabling accurate hit detection for the weapon during runtime.

<figure><img src="https://2614465389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhXtfCgw8FokTHnCnF7So%2Fuploads%2FXfchazedOHt0B2yXdWt5%2FUntitled.png?alt=media&amp;token=50076b6d-a8d5-4c6e-97e9-47d3ad244cfb" alt="" width="375"><figcaption></figcaption></figure>
