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

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 :slight_smile:

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.

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

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 :smiley: 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.

“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.


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

on your structure BP then -


set the spoil times on the inventory bp

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).

As you can see I get an error in the

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


the other has the


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.

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 -

In my Structure BP I have the flag




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.

So you’re saying that if you do this -


You don’t get this? -


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

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!

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.

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:

  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.

  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

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.

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 -


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

And it does work like so -






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