Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What am I doing wrong? Item object isn't assigned to DroppedItem3D #112

Open
warsang opened this issue May 2, 2024 · 4 comments
Open

What am I doing wrong? Item object isn't assigned to DroppedItem3D #112

warsang opened this issue May 2, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@warsang
Copy link

warsang commented May 2, 2024

Hi!

I've been playing around with a multiplayer Godot example ( https://github.com/warsang/Godot-multiplayer ) and have a little tree node that when hit a bunch of times ("right_click" when close to the tree) by my character spawns a DroppedItem3d.
For some reason the DroppedItem3d doesn't have an Item object assigned to it in the Godot "Remote" view.

Locally, my "WoodDroppedItem" looks like:
image

However, remotely, it looks like:

image

That means, I can't call character.character_inventory_system.pick_to_inventory(self) or I get:

image

Steps to reproduce:

I am using Godot 4.2;

  1. Clone the repo I linked;
  2. Run 1 server instance and 1 or two client instances;
  3. Click on tree a bunch of times to get it to disappear and spawn a resource
  4. Observe that the resource doesn't have an item assigned to it when it should and that calling pick_to_inventory will return false.

Thanks in advance!

@scriptsengineer
Copy link
Member

The bug is a little complicated to understand, I'll have to analyze it more calmly, because it seems to me that you can instantiate the dropper without using a network?

@scriptsengineer scriptsengineer self-assigned this May 4, 2024
@scriptsengineer scriptsengineer added bug Something isn't working question Further information is requested and removed bug Something isn't working labels May 4, 2024
@warsang
Copy link
Author

warsang commented May 4, 2024

Hmm I tried instantiating the DroppedItem3d without a multiplayerSpawner node (I was using the DroppedItemSpawner from the multiplayer example) and I get the same issue. No Item resource is assigned to the item @export of DroppedItem3d in the Remote debugger view

@scriptsengineer
Copy link
Member

Hello @warsang check here, it seems to me that the inspector just does not display the object correctly in "remote" mode, but at the top the inspector shows the ID of the item and confirms that it is complete or that, to test just click on the item marked with a arrow.
image

@scriptsengineer
Copy link
Member

@warsang on your example is clear that there are no problems with the inspector, but there is a bug that gives a "pick_to_inventory" and it was created for another reason, so I debug this to be able to know more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants