# Give buff to dino rider

**URL:** <https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400>\
**Category:** ARK: Survival Evolved\
**Tags:** unreal-engine, Ark:-Survival-Evolved, Modding\
**Created:** [December 12, 2016, 5:21am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400 "2016-12-12T05:21:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_9d16538f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9d16538f](https://forums.unrealengine.com/u/anonymous_user_9d16538f)\
**Post date:** [December 12, 2016, 5:21am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/1 "2016-12-12T05:21:29Z")

</div>

I am trying to figure out how to give a buff to a dino rider. Basically i want it to only work on the player when he’s riding a specific dino.

ex.

Player mounts dino -\> buff applied to player.  
Player dismounts dino - \> buff removed.

I honestly have no idea on how to pull this off.

Does anyone have an idea of how to pull this off?

---

<div class="post-metadata">

**Author:** ![Sgt.Morrigahn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sgt.Morrigahn](https://forums.unrealengine.com/u/Sgt.Morrigahn)\
**Post date:** [December 12, 2016, 7:51am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/2 "2016-12-12T07:51:13Z")

</div>

Can you add the buff to the saddle?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_abbc9617](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_abbc9617](https://forums.unrealengine.com/u/anonymous_user_abbc9617)\
**Post date:** [December 13, 2016, 9:43am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/3 "2016-12-13T09:43:21Z")

</div>

> [@snkgeek23;636700](#):
>
> I am trying to figure out how to give a buff to a dino rider. Basically i want it to only work on the player when he’s riding a specific dino.
> 
> ex.
> 
> Player mounts dino -\> buff applied to player.  
> Player dismounts dino - \> buff removed.
> 
> I honestly have no idea on how to pull this off.
> 
> Does anyone have an idea of how to pull this off?

If you want your mod to remain stackable, you’ll need to apply the buff to the rider directly from an equippable item, either a saddle or something else (eg: costume) that you equip to the dino.

[HR][/HR]

**Your equippable item (eg: saddle, costume) blueprint:**

First you’ll need to get a reference to the dino you can do this with the following:

```auto

Event Blueprint Equipped -> Get Owner Inventory(self) -> Get Owner() -> Set DinoChar

```

There isn’t an event for when a dino has a rider so you’ll need to check on tick to see if it does. Using the _Event Equipped Blueprint Tick_ we can do this:

```auto

Event Equipped Blueprint Tick -> HasRider(DinoChar) -> Branch(True) -> GetRider(DinoChar) -> Set DinoRider -> HasBuff(DinoRider) -> Branch(False) -> StaticAddBuff(BuffClass, DinoRider, self) -> Set BuffActor -> BuffActor -> Use BPDeactivated(True)

```

The buff will now be applied once to the rider. The result of Has Buff on subsequent event ticks will be true, and we will not apply another buff.

Now for when the rider dismounts we need to expand the _Event Equipped Blueprint Tick_ code above to handle when HasRider returns false and remove the buff from the DinoRider (the last known player to ride the dino)

```auto

Event Equipped Blueprint Tick -> HasRider(DinoChar) -> Branch(False) -> IsValid(DinoRider) -> Branch(True) -> HasBuff(DinoRider) -> Branch(True) -> BPDeactivate(BuffActor) -> Set DinoRider(None)

```

This will remove the buff from the dino rider once. Because we set the reference to DinoRider to None in the last call, subsequent calls to IsValid(DinoRider) will return false.

Finally lets clean up the references we set in our blueprint when the saddle is unequipped (this is good practice and helps the garbage collector to free up memory):

```auto

Event Blueprint Unequipped -> Set DinoChar(None) -> Set DinoRider(None) -> Set BuffActor(None)

```

[HR][/HR]

Finally you will want to implement what happens inside the buff’s _Event BPDeactivated_, if you only want to destroy the buff when BPDeactivate is called then the following will suffice:

**Your Buff blueprint:**

```auto

Event BPDeactivated -> DestroyActor(self)

```

[HR][/HR]

Hopefully this explanation helps. Sometimes you just have to look at the problem differently.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9d16538f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9d16538f](https://forums.unrealengine.com/u/anonymous_user_9d16538f)\
**Post date:** [December 14, 2016, 11:36am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/4 "2016-12-14T11:36:50Z")

</div>

I was able to pull it off; For anyone curious or searches this thread somewhere down the line; here is the code.

I simply added “RiderBuff” as a variable so i could set it to whatever i wanted within the defaults tab.

 ![3cef85e105db792c3838c57886d6023a.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/e/0e547eca83eb1f634d8dcfee44d9d066573b3a56.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_abbc9617](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_abbc9617](https://forums.unrealengine.com/u/anonymous_user_abbc9617)\
**Post date:** [December 18, 2016, 3:49am UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/5 "2016-12-18T03:49:57Z")

</div>

Ah I forgot that BPNotify was added in later versions of the dev kit, obviously a much simpler way of doing it than what I suggested (which I guess is the old school method now :P)

---

<div class="post-metadata">

**Author:** ![SkyeEden](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/skyeeden/32/1116094_2.png) [@SkyeEden](https://forums.unrealengine.com/u/SkyeEden)\
**Post date:** [March 9, 2022, 9:34pm UTC](https://forums.unrealengine.com/t/give-buff-to-dino-rider/80400/6 "2022-03-09T21:34:12Z")

</div>


