-
I've got relatively slow paced and long life bullets (plasma bolts to be specific -- pew pew!) for my game, so I'm using the network addon for it. The problem I am running into is the following error on the client: However I am following the same patterns as the player spawning (which does work), other than using a a chash. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Just to make sure about things, did you disable the class hash within the
Another thing, when you registered the spawner for type of entity, which value did you set for the class hash? When it's not in use usually it's a good idea to pass in 0. Those are the two possible sources that I can think of. If both are correct then it's possible there is some bug within the system. |
Beta Was this translation helpful? Give feedback.
-
Part of my problem is that I am still unsure what the class_hash is for and the contexts to use it in. I've read over this a few times now but class_hashes are not clicking for me yet. It allows different scenes to be used with the same SnapClass? |
Beta Was this translation helpful? Give feedback.
-
Well, class_hash is actually a poor name I have chosen. "class_id" or something like that would have been a lot better. Nevertheless, yes, it is a way to allow the exact same SnapClass to handle multiple different scenes. When you are sure your snap class will handle just one single type of object then you can completely go away with the class hash. |
Beta Was this translation helpful? Give feedback.
Well, class_hash is actually a poor name I have chosen. "class_id" or something like that would have been a lot better. Nevertheless, yes, it is a way to allow the exact same SnapClass to handle multiple different scenes. When you are sure your snap class will handle just one single type of object then you can completely go away with the class hash.
I have named it like that because I normally take the resource path of the scene and hash it (
String.hash()
). Again, it's a poor name but when I realized that it was a bit too late to change!