Page MenuHomeFeedback Tracker

SCR_CharacterInventoryStorageComponent "OnAddedToSlot" does not return Children
Assigned, NormalPublic

Description

If you need to get the Children from the item in: SCR_CharacterInventoryStorageComponent "OnAddedToSlot"

It will always return "NULL"

But, if you try the same with "OnRemovedFromSlot" the Children will retun.

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
modded class SCR_CharacterInventoryStorageComponent : CharacterInventoryStorageComponent
{

	protected override void OnAddedToSlot(IEntity item, int slotID)
	{		
		super.OnAddedToSlot(item, slotID);		
		
		if (!SCR_PlayerController.GetLocalControlledEntity()) 
			return;
			
		IEntity child = item.GetChildren();
			
		Print("OnItemAdded");
		Print(child);         // ALWAYS NULL	
	}
	
	protected override void OnRemovedFromSlot(IEntity item, int slotID)
	{
		super.OnRemovedFromSlot(item, slotID);

		IEntity child = item.GetChildren();
		
		Print("OnRemovedFromSlot");
		Print(child);		// THIS WORKS !		
	}	
}

Event Timeline

R34P3R created this task.Dec 11 2023, 12:58 AM
R34P3R edited Steps To Reproduce. (Show Details)
Geez changed the task status from New to Assigned.Dec 11 2023, 11:26 AM