# Implementation

Step-by-step guide on how to implement BPC\_Hitscan into one of your blueprints.\
If you need guidance, feel free to open a ticket via our [Discord](https://discord.gg/nJRkUWMbxG) server through the Ticket-Support channel.

<figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FQudnBa1RZZjgiScMSfbU%2Fimage.png?alt=media&#x26;token=8c9bce59-da4d-4953-a490-ddb261ef144f" alt=""><figcaption></figcaption></figure>

**Implementing BPC\_Hitscan**

1. Open the Blueprint where you want to add this component.
2. In the Components Tab, add the BPC\_Hitscan component to your blueprint.![](https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FvbPdUBuQwmSFwjnej6sb%2Fimage.png?alt=media\&token=f8055e99-88cf-4db9-b7c9-475f08fa6d9f)
3. Navigate to Class Settings and add the 'BPI\_Hitscan' interface.

   <figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FsVpnCPzO5uKRYiPkNrn2%2Fimage.png?alt=media&#x26;token=12360fe0-46be-43cf-b8b4-35d942f92606" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FRLXjQiyI2dYApbxnZVQv%2Fimage.png?alt=media&#x26;token=466172b6-8482-44ca-b412-8d3673aa6196" alt=""><figcaption></figcaption></figure>
4. Implement the newly added functions in your blueprint. The Hitscan Component needs this information provided by the owning actor to work properly. It's basically up to you how you provide them. Refer to our examples for how we provided this information.

<figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2F8KO46jSkmEYq7LsdRBmi%2Fimage.png?alt=media&#x26;token=54872038-1ff8-4f21-aaba-3330643694f4" alt=""><figcaption><p>Interface functions</p></figcaption></figure>

1. In 'Project Settings', create a new Trace Channel:
   * Name it 'Hitscan' and set the default response to 'Block'.

     <figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2F169f8LVIlpPLK4nS9NGb%2Fimage.png?alt=media&#x26;token=dbde120a-7012-4faf-9147-f9860c493982" alt=""><figcaption></figcaption></figure>
2. In 'Pawn', set the 'Hitscan' Trace Channel response to 'Ignore' to bypass Capsule collisions.

   <figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FZmYo0thk3e44iZVbDGYa%2Fimage.png?alt=media&#x26;token=1dd58f09-f15f-41c8-ac1f-a2b00688ac0b" alt=""><figcaption></figcaption></figure>
3. Set the 'Trace Channel' variable in BPC\_Hitscan to 'Hitscan'.
4. Use 'OnPerformHitscan' in the Event Graph of your blueprint.
5. Click on 'BPC\_Hitscan' and implement the Dispatchers:
   * You find them in the Details tab, scroll down, and click '+' for each Dispatcher you want to use.
6. Apply damage using the values like so

   <figure><img src="https://867544918-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqzVFz58t0jKjSlq4LTZ%2Fuploads%2FWiybQkUxafYtbydo11co%2Fimage.png?alt=media&#x26;token=a6b2f0de-fa5c-4a13-b6c5-a3125b6dd344" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Example Blueprints show you how to use the component.\
\
BP\_ExampleWeapon, BP\_ExampleDrone, and BP\_Turret.
{% endhint %}
