# Quick Start Migrating to existing Project

1. Add the pack to your project\
   Go to the unreal library and add the Magic Spell System to your Project
2. open your character\
   Add the character interface

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FkzOPdGStj5A0qMBTp71W%2FScreenshot%202024-09-07%20141230.png?alt=media&#x26;token=11b585cf-6173-4d73-9221-70cc343f0ac6" alt=""><figcaption></figcaption></figure>

3. Add the components to your character

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FbkCiQm1Rv4LCkK6fn1YC%2FScreenshot%202024-09-07%20141532.png?alt=media&#x26;token=514f80af-a5ae-46a3-97cf-553cb5de7d62" alt=""><figcaption></figcaption></figure>

4. Check stats component and targeting component for its settings

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2F1kZlWElowBLkRMT2Of9v%2FScreenshot%202024-09-07%20142317.png?alt=media&#x26;token=c0566e9f-2881-4644-8b90-f1e4c0e5724b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2F0xWmkR7VKAjspzIB1UgQ%2FScreenshot%202024-09-07%20142355.png?alt=media&#x26;token=b352270d-5aae-40b5-b37a-d33915e57c81" alt=""><figcaption></figcaption></figure>

5. In your character, go to the interface functions and add these components

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FhC2QgME62lV55dj3UZWM%2FScreenshot%202024-09-07%20142601.png?alt=media&#x26;token=18c8b09f-a620-4a38-b047-a9f54e03967b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FlhgjkwZT5kd52uyj2USL%2FScreenshot%202024-09-07%20142631.png?alt=media&#x26;token=90495788-45a3-4c58-92aa-4bef81bd6eb7" alt=""><figcaption><p>Get Anim Type</p></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FDTSZxObvGhWQgs3eM3I2%2FScreenshot%202024-09-07%20142751.png?alt=media&#x26;token=c1d7c6b3-bbc6-4dbf-a7c8-4ab2686822be" alt=""><figcaption><p>Get Character States</p></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2F8QlXerHuRJBlBEPRgorS%2FScreenshot%202024-09-07%20142840.png?alt=media&#x26;token=abc8d401-e418-4a98-baef-a0641b5c5be1" alt=""><figcaption><p>Get Camera Component</p></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FWUjJ81ttCVFqPZg6HtxO%2FScreenshot%202024-09-07%20142909.png?alt=media&#x26;token=1a8dfa0a-e166-4383-9a1e-f1bfc43163ed" alt=""><figcaption><p>Get Player Reference</p></figcaption></figure>

## Animation Blueprint

### <mark style="color:red;">Make sure you have all animations retargeted to your character before continuing!</mark>

Under <mark style="color:orange;">ActionMagicSystem/Demo/Animations/Mage/Montages</mark> AND <mark style="color:orange;">ActionMagicSystem/Demo/Animations/Mage</mark> select the montages and retarget them

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FVS4sUbFNQVEwwW0Z6GCb%2FScreenshot%202024-09-07%20145330.png?alt=media&#x26;token=b72ac634-3928-4411-8398-0a3d943df990" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">IMPORTANT!</mark>

In the anim blueprint, we read the combat state and do a simple additive blend, you can do what ever you want with these values. in our example, we rise the right hand of the character to signal that a target is locked, or the RMB is held

<mark style="color:red;">Depending on the Montage type, Either Blend upper body or Full Body montages Select in the montage as Slot "Upper Body" OR "Default" as Slot</mark>&#x20;

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2Fk1ToUCjldK2gaAFY24SC%2FScreenshot%202024-09-07%20143440.png?alt=media&#x26;token=d5f205f6-5653-4769-8f32-4defaff69777" alt=""><figcaption></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2F52HQETx9yZag7VKbPo3M%2FScreenshot%202024-09-07%20143813.png?alt=media&#x26;token=48dc159c-c504-4a45-b8b7-f1c11bc1104c" alt=""><figcaption><p>Blend between different states depending on the combat state ENUM</p></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FtEHXksHDyKff9uUPSNqz%2FScreenshot%202024-09-07%20143904.png?alt=media&#x26;token=08efd36d-fd59-4da3-8e31-fb924247b4ad" alt=""><figcaption><p>The right hand additive we mentioned before is blended here</p></figcaption></figure>

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FXwyTPKjxYBd8SWwhh3bT%2FScreenshot%202024-09-07%20150350.png?alt=media&#x26;token=11298d23-4815-4f7c-a6fe-683f6f5c3083" alt=""><figcaption></figcaption></figure>

Add the input mapping to your character found in <mark style="color:orange;">ActionMAgicSystem/Demo/ThirdPerson/Input</mark>

Add the needed input logic if needed

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FdkjDKwKCgmFPkr0oJLQw%2FScreenshot%202024-09-07%20150654.png?alt=media&#x26;token=37f49fe1-7cff-4680-b639-34d9d57f16dc" alt=""><figcaption></figcaption></figure>

## Result

It should look like this now

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FMjEL1BRHqHNaVGwZ7nPO%2FScreenshot%202024-09-07%20150812.png?alt=media&#x26;token=925fefbc-2a9a-4f53-83fd-7e94f38aba0b" alt=""><figcaption></figcaption></figure>

## Last Steps

if you use your own character and retargeted the montages, you have to go to the Spell Data Table and replace the montages with the retargeted ones

Go to ActionMagicSystem/Blueprints/Data\_Tables and open the DT

Set the Montage reference to the new retargeted montage

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2Ft2EDCcZdG2Ujbi8LCtE8%2FScreenshot%202024-09-07%20151319.png?alt=media&#x26;token=03591e06-ca70-483c-b907-66131c950aaf" alt=""><figcaption></figcaption></figure>

## Test

Open you test level and go to ActionMagicSystem/Demo/Blueprints and add one Add\_Spell\_Trigger to your level

in the details panel of the actor, set the spell ID to one you like to see (look in the Data Table for the spell ID

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FJiXs781MZZjZddduKhTa%2FScreenshot%202024-09-07%20151516.png?alt=media&#x26;token=7eb01623-3cb6-42de-8626-b0180fb0c0b1" alt=""><figcaption></figcaption></figure>

Approach the actor and press F

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FUmGPR94JAlyikiiFSJYB%2FScreenshot%202024-09-07%20151704.png?alt=media&#x26;token=847bc145-7e10-4da4-86c8-355d3cf29b4b" alt=""><figcaption></figcaption></figure>

Cast the spell with the corresponding key 1-4

<figure><img src="https://603854490-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIYpx8GDKCTy6DRbPD4HF%2Fuploads%2FrKYDcGvSuOnGaUtqScCt%2FHighresScreenshot00000.png?alt=media&#x26;token=98852596-56da-4f6b-b490-2f7d27449638" alt=""><figcaption><p>Now you just cast a Fireball!</p></figcaption></figure>
