Build structure conditions

I’ve made a container added some functionnalities to it but i cannot figure how to make some work

i’ve got :

  • The engram entry
  • The primal Item
  • A primal Inventory as componenent
  • the BP Actor
  • an other static mesh as component
  1. I wanted the structure to be build only if the player is in a tribe :
    -i first try to do it in the BP “On Begin Play” but my cast to player state failed
  • then look for a way to disable the use of PrimalItem in inventory but no event seem to be called
  1. i can toggle visibility of my supp mesh component through multiuse entry, but i wanted it to toggle when the inventory is empty or not
    I can do it on “Tick Event” and get the length of the inventory but i’ld prefer to trigger it when there is a change in the inventory Add or Remove but I cannot find something like that

  2. how can i add a prevent build reason? and what is the node that should be used to send notification to the player?
    the 2 new reasons are “only one structure/tribe” and “Owner isn’t in tribe” (I put it in “prevent build structure reason string overrides” of BP options)
    When we use the PrimalItem it spawn the “preview” i don’t know how to change the conditions of this one so I made a get all actor of class, get length and destroy actor (that destroy the preview actor) if length>1
    doing so i get the “only one structure/tribe” notification but i don’t really understand why

  1. When you place a structure, event begin play executes twice. You need to get actor location (or whichever location it is) and check that each value is greater than 0. This is how I circumvented that crash. We’re working on making the bCanUse variable update dynamically… How to require engram on item use - ARK: Survival Evolved - Epic Developer Community Forums

  2. You can hide this inside of BPGetMultiUseEntries. This ticks like every frame and executes on the client. Just throw the check in there for an empty inventory inside of the BP Actor. Also, how are you going to add more items to an empty inventory if it’s hidden?

  1. i’ll check and study that thx

2)the inventory is always visible, my dev kit is not lunch yet, i’ll add some pictures, but only some components are hidden/visible depending on inventory

i can do this like this : Event Tick → get PrimalInventory → get length → Branch =0 → Get my component → set visibility hidden/visible
but it will be better to trigger it when an item is add or remove from inventory then check every frame

ok so i just do the following

with that i cannot use the item in inventory when i’m not in tribe, then i create one and it seems it refreshes caus’ i can use it

“Better” might not be better. Use the logic -

If length > 0 > if mesh = empty > set mesh

This way you’re just checking two variables per frame, and not actually changing anything except for that 1 frame that it changes. Something to note: this might only work outside of the inventory, so you won’t see the change when you’re remote viewing.