Hello . In my game i use a function to SpawnLoot for either All players or just one . For example when i kill one enemy i want each player to get their own loot . or if a player opens a chest i want only the player that opened the chest to get the loot . The problem i'm having is how to exactly code visibility for this . Cause right now if my Server spawns some loot the client can't see or interact with it (GOOD) , but if my client spawns loot , the server can't interact with it (good) but CAN SEE IT (BAD ) .
#Client instanced Item spawn . Visible on the Server
1 messages · Page 1 of 1 (latest)
UFUNCTION(BlueprintCallable, Category = "Gameplay|Loot",meta = (WorldContext = "World",AdvancedDisplay = "bAutoPickup",DefaultToSelf = "LootSource"))
static void SpawnInstancedLoot(UWorld* World,
const FVector& Location,
UDataTable* LootTable,
AActor* LootSource,
APlayerController* TargetPlayer = nullptr,
bool bAutoPickup = true);
this is the function to spawn the items .