# 2 different spoil timers for electrical cooled feeding trough? How?

**URL:** <https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770>\
**Category:** ARK: Survival Evolved\
**Tags:** unreal-engine, Ark:-Survival-Evolved, Modding\
**Created:** [January 2, 2017, 12:52pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770 "2017-01-02T12:52:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 2, 2017, 12:52pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/1 "2017-01-02T12:52:13Z")

</div>

Hey there, I’m very new to ark modding and not very experienced.^^;  
So i wanted to make a feeding trough, that needs power from the generator. If powered it should have a spoil timer of x100. So far I got it to work.  
BUT if it’s not powered it should have the normal feeding trough spoil timer of x4 and I have no clue how this could be done.  
I’m thankful for every help 🙂

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 2, 2017, 5:37pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/2 "2017-01-02T17:37:23Z")

</div>

That you’ll have to do in the graph.  
You’d want to create an event that checks to see if it’s powered or not, if not powered have it set the spoiling time variable to 4x, if powered have it set it to 100x.  
A looped timer event would work or maybe even just using the “Event BPUnstasis” or “BeginPlay” event might be enough. It will check the power everytime someones comes close enough to pull it out of stasis. One issue I can foresee that you’d have without using a looping timer to check it is that if you were within stasis range and it lost power, it would not set the spoil time to 4x until you left stasis range and came back.

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 2, 2017, 5:50pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/3 "2017-01-02T17:50:31Z")

</div>

Thank you very much P0k3r, I will try to do that 🙂

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 2, 2017, 9:36pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/4 "2017-01-02T21:36:12Z")

</div>

Actually, now that i think about it, it would be much easier to just use the BPContainer Activated/Deactivated events on the graph since you have turned it into an activate-able container  
Activated sets 100x  
Deactivated sets 4x  
boom you’re done

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 3, 2017, 8:47pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/5 "2017-01-03T20:47:10Z")

</div>

> [@P0k3r;645246](#):
>
> Actually, now that i think about it, it would be much easier to just use the BPContainer Activated/Deactivated events on the graph since you have turned it into an activate-able container  
> Activated sets 100x  
> Deactivated sets 4x  
> boom you’re done

Thanks again for your reply. Sadly this way does not work for me.  
I have the Event BPContainer Activated in the structure BP and not in the inventoryBP where I have the setSpoilTimeMultiplier. I think I just miss a small step but could not find it.  
So far what I did was setting the Inventory active using the set\_active component and used the is\_active in the inventory. But somehow this seems not to be triggered.  
Next I will try the looped timer event but that seems a bit dirty to me 😃 so using the is\_powered boolean would be nice.  
Is there something I missed (even though there is only little information here…)?  
Probably it is something I overlook in the graph environment.

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 3, 2017, 9:24pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/6 "2017-01-03T21:24:33Z")

</div>

“Get My Inventory Component” on the structure bp then you can drag out the variables from there.  
I’m assuming you are using the “Item Spoiling Time Mulitipliers” in the inventory bp?  
If so, you have 2 options. Set them like so in the structure bp graph - This way you can set unpowered also.

![e5cb564b33a55c0b754d9157d2424c3e.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/3/c36fc1fee7b36193f68521d7884c0da7b52f2c44.png)

Or, if you don’t really need to adjust the unpowered spoil time you can just check this -

 ![1f0f10fff5957389eb8808c57f066804.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/4/b414001e5031429da358d0db57944a17c3377803.png)

on your structure BP then -

![e5cb564b33a55c0b754d9157d2424c3e.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/4/dc4151338c269de0db728eb3ce97259125545000.png)

set the spoil times on the inventory bp

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 4, 2017, 12:02pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/7 "2017-01-04T12:02:04Z")

</div>

Hi and thank you again for the reply. The first part is exactly what I wanna do. A single spoiltimer is fine but using two is problematic.  
Following is the graph for the Structure BP which is not working (Multiplier stays on 4 instead of 100 when powered by a generator).

 ![Unbenannt.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/0/703b620cc0dae8d2c7bce46f19e505fdf0020e1d.png)  
As you can see I get an error in the

```auto

Set ItemSpoiling Time Multipliers

```

where it says it can not find the variable.  
It also does not work when powered that way. I added the three new variables to overcome the problem of not being able to set the variable.  
In addition I got two inventories. One is called

```auto

MyInventoryComponent

```

the other has the

```auto

PrimalInventoryBP

```

in the name. Do I use the wrong inventory?  
The actual logic behind it is simple, but the graphical scripteditor gives me some headache.  
My guess is that even when powered by a generator the Event might not be triggered?  
Sorry for the properly stupid questions, I try to understand what is happening here.

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 4, 2017, 4:11pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/8 "2017-01-04T16:11:15Z")

</div>

My inventory component should be fine. Not sure what the error would be from. The event won’t fire if you don’t have it enabled in defaults -

 ![3ce6a288194767892705f2744e803532.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/b/96b8ba49ae068c10e4c8cf74d4428bbe0f1709d5.png)

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 4, 2017, 5:28pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/9 "2017-01-04T17:28:30Z")

</div>

In my Structure BP I have the flag

```auto

UseBPActivated 

```

and

```auto

UseBPCanbeActivated

```

set. Just to clear confusion: it is powered by a generator so it has no fuel inside. Just if that makes a difference.  
I put in a print statement between the Event and the Set function but it does not print the message on screen. So not sure what is going on here.  
In addition I added a breakpoint at the event which is also not reached.  
The Default part looks like in the image below.

 ![BPStruct.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/d/18d3daa3ebd2e25c825fb06fa6a3ab78d5387468.png)

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 5, 2017, 1:58am UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/10 "2017-01-05T01:58:36Z")

</div>

So you’re saying that if you do this -

![471383f779101c80697d86972b8a8d31.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/e/2ea57436f7b673e3756f31dbee16846f6c04b6eb.png)

You don’t get this? -

![1b79e0cbb6e5825e4a41822751e60cf0.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/7/77d90fa08def752fda7a4d3c7dd9e607ad67f7b1.png)

If UseBPActivated is enabled and you are not getting a print string to fire then I’d recommend verifying your devkit because that event should fire client and server everytime if enabled  
If you have code between the activated event and print string and it’s not printing that means there is an error in your code somewhere. Probably a variable that needs to be replicated or something. Hard to say without seeign what you’re doing

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 6, 2017, 1:44pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/11 "2017-01-06T13:44:31Z")

</div>

So, I veryfied my DevKit twice, before and after updating, it still doesn’t work at all. (Even tried it on a completely fresh install on a different pc) UseBPActived is definitely activated, but still no print. Also tried it on different structures, still no print. For testing I just put the BPContainer Activated event and the print string, but even that doesn’t work. Am I missing something fundamental there? I really have no clue what is going wrong.  
Thanks a lot for your help so far!

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 6, 2017, 6:16pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/12 "2017-01-06T18:16:03Z")

</div>

Since it’s powered by electricity I’m assuming it is auto activating? Maybe the activation events don’t fire for auto activation. Try ticking “Can Toggle Activation” and it should give you a turn on/off option in multiuse. See if that fires the event.

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 6, 2017, 8:37pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/13 "2017-01-06T20:37:13Z")

</div>

I tried to do what you said, but nothing like turn on/off shows up in multiuse, nothing seems to change. Could you tell me what you used for the print string example you posted earlier? Just so I can test around with that. Sorry for keeping you bussy :rolleyes:

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [January 6, 2017, 9:10pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/14 "2017-01-06T21:10:27Z")

</div>

1. Are you sure you’re using your feeding trough?

2. Did you try deleting it from the map and replacing it? I’ve had scenarios where the structure wouldn’t update until I replaced it.

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 6, 2017, 9:23pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/15 "2017-01-06T21:23:09Z")

</div>

1. Yes I am, tried it many times, but tried it also with different structures to see if I have the problem only with the trough
2. I spawn it in every time, I didn’t place it on the map with the editor

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [January 7, 2017, 1:01am UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/16 "2017-01-07T01:01:02Z")

</div>

I recommend enabling “Can Toggle Activation” and then dragging and dropping it into your level, then spawning and seeing if you can press on/off (use cheat givetome to make it yours). Then go from there.

---

<div class="post-metadata">

**Author:** ![Furry\_Ferret](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_Ferret](https://forums.unrealengine.com/u/Furry_Ferret)\
**Post date:** [January 7, 2017, 3:20pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/17 "2017-01-07T15:20:32Z")

</div>

Also didn’t work Huston850. No on/off option

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 7, 2017, 4:54pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/18 "2017-01-07T16:54:26Z")

</div>

> [@Furry Ferret;647443](#):
>
> Also didn’t work Huston850. No on/off option

Something is not right somewhere because I just took a stock feeding trough and ONLY ticked the “Can Toggle Activation” and got this -

![9067d5f4b6a0e34986bff21cc4110688.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/9/69cecfc7fdf09021f027ae93b82436aaa147794d.png)

Which leads me to believe that you are missing a reference somewhere and it’s spawning in the default trough, not yours since you are not getting the light fire option

---

<div class="post-metadata">

**Author:** ![P0k3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@P0k3r](https://forums.unrealengine.com/u/P0k3r)\
**Post date:** [January 7, 2017, 5:27pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/19 "2017-01-07T17:27:28Z")

</div>

And it does work like so -

![d9cb729824f8e6539185371dc8aab5d9.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/9/8e9aeb7b8a133c7486c4232aa25add59d29a2291.png)

Off-

![3b18d8e638428d8706b64c6ea469b3ba.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/a/9a35d99741467b69bc252b0795f9e9d990ee0c15.png)

On-

![dbc95c651d812637f6e9ec588a37c5c2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/a/da8e68514cc626271da9ac273004e800ec6e702f.png)

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [January 7, 2017, 7:28pm UTC](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770/20 "2017-01-07T19:28:42Z")

</div>

> [@Furry Ferret;647443](#):
>
> Also didn’t work Huston850. No on/off option

Returning to square 1 is always the solution 😉 I trust that you’re editing AND PLACING /Mods/MyMod/MyFeedingTrough ?

[Next page](https://forums.unrealengine.com/t/2-different-spoil-timers-for-electrical-cooled-feeding-trough-how/81770.md?page=2)
