> For the complete documentation index, see [llms.txt](https://patpat.gitbook.io/penguin-action-toolkit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://patpat.gitbook.io/penguin-action-toolkit/tutorial/effect/apply-effects.md).

# Apply Effects

There's several way to apply Effects a Character:

### Hitbox & Hurtbox

<figure><img src="https://2451041454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9gUBPgMhOgtHUM3SGNRf%2Fuploads%2FoG7mFbYfrE6NxO7N009K%2Fimage.png?alt=media&amp;token=0f74d630-56e7-4745-84fc-7358d21dd996" alt=""><figcaption><p>Hitbox</p></figcaption></figure>

<figure><img src="https://2451041454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9gUBPgMhOgtHUM3SGNRf%2Fuploads%2FhuGEVgOjSCTaYccqJMJ8%2Fimage.png?alt=media&amp;token=5b65fb14-51ba-4bbb-8d11-f37e17985b47" alt=""><figcaption><p>Hurtbox</p></figcaption></figure>

When hitbox is activated, if collided with hurtbox, it will send all effect it holds to the hurtbox's character if that's a successful hit. Hurtbox can be invincible if the character holds it's I-Frame tag. Also, a Hitbox will only hit a Hurtbox once before reactivating.

Although we used raycst, this hit detection still relies on box collision a lot, we recommend you give all Hurtbox a rigid body to enable the collision.

We generally recommend you to control hitbox with *Attack with Hitbox Mod*

### Add Effect Mod

<figure><img src="https://2451041454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9gUBPgMhOgtHUM3SGNRf%2Fuploads%2Fo3BqjUXn0bUhbjcV1wbp%2Fimage.png?alt=media&amp;token=0c8d5cbf-68f8-441a-9ff5-16a3d4a13db6" alt=""><figcaption><p>The Add Effect Mod</p></figcaption></figure>

This add the effects it holds to character

### Write Your Own Code

Code with, there's two ways to apply an effect to a character:

**Add Effect:**&#x20;

<figure><img src="https://2451041454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9gUBPgMhOgtHUM3SGNRf%2Fuploads%2FWlTGlPxUfyCoZf4Q9WTS%2Fimage.png?alt=media&amp;token=4e5176a2-406d-4c03-a8f0-dff3ebc1c076" alt=""><figcaption></figcaption></figure>

This simply add the effect to a character. Good for single character cases.

**Send Effect Package:**&#x20;

<figure><img src="https://2451041454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9gUBPgMhOgtHUM3SGNRf%2Fuploads%2FxWQNRfRNigV0Aew344bW%2Fimage.png?alt=media&amp;token=e86a67f4-e236-45c3-a763-c61faef1d2e2" alt=""><figcaption></figcaption></figure>

This call will let one character send effects to another character, and this action will be broadcasted to action events. Hitbox and Hurtbox are actually using this to deal damages. <mark style="color:orange;">**This call will also send a duplicate of the effect instead of the originally one to prevent reference issue.**</mark> You shall use this method to achieve the between character interaction.
