Download

Event call between BPs not sending int value

Hi all,

I have the following setup:

  • A client-side inventory HUD
  • A server-side character which holds item data etc

I am calling an event on the character from the inventory that SHOULD:

  • Send an integer value
  • trigger the next node

currently the next node is triggered, which causes an item to drop and a slot to clear. However, the integer value serverside is never updated and always sits at zero.
due to this, if I drop or equip an item, the first slot in the inventory is always cleared - even if I click a different one.

These are the relevant BP nodes with watched values:

The watched client value:
75ea131041f5bb99e6257e69359bd543446dbc94.png

The event call:
071d695bdc220e3e0e514d61e89926915a4293de.png

The serverside int value:
3452d8b33f234754c6ab56bac4561ec46391b978.png

If I put a random int between 0-7 in on the server side, or indeed a fixed value within that range, the slot indicated will clear. So the only issue is the integer value not being sent/received.

thanks in advance for any help.

Bump as I really need a solution :frowning:

Bump, I have tried absolutely everything. Interfaces, functions, replicated custom events, casting to the inventory to retrieve it, casting to the player to set it. Why can’t I send a simple integer value from my inventory to my character? I’ve been trying to solve this for a week now.

could you give better pictures and explain it more?

Sure thing.

  • I have an array for my character inventory (server side)
  • I can pick up items and they will be placed into empty slots (via a bool check)
  • In the inventory UI, I have an integer value that is set when a slot is moused over/clicked (so client-side)
  • when an item is dropped, an interface event is called which drops the item and clears the slot
  • currently I am casting to the player to set an integer variable (executing on server)
  • when watching this variable, it is either always at 0, or not in scope
  • due to this, only slot 0 is ever cleared

here are some more screenshots:

This is the inventory casting to the int on my player

160e23dccfc4e71641a2a2acbbe19565ec31205f.png

This is my player attempting to read the variable when clearing a slot

01e2984d6d7ce1bf8054ba047ede42032c9fd454.png

This is the clear slot function

7f2acc44170dd5d8278cc26f3a86d455b486a18d.png

hopefully that is easier to digest, I can make a video or get more screens if needs be