#Help with Sychronizing doors...

21 messages · Page 1 of 1 (latest)

hoary heart
#

So i've been trying to make the doors synchronize for 3 hours now and nothing seems to work, tutorials to examples, nothing works, the player should be able to open doors by looking at them and holding E for some time, i sent both of the scripts (RaycastDoor is attached to the player camera, and the DoorInteractable to the door)

RaycastDoor.cs - https://pastebin.com/frjHUrEw
DoorInteractable.cs - https://pastebin.com/75dxstnx

cinder pagoda
#

So what actually happens?

hoary heart
#

Nothing, it's not opening and no errors are shown

wet lake
hoary heart
#

No

unborn pecan
wet lake
#

OR

#

You can create SyncVar hook method and set animator settings in this method

hoary heart
hoary heart
#

Alright

hoary heart
#

But im new to Networking and all that so i can't seem to figure it out

tidal flicker
#

replace the animator ref with the NetworkAnimator you're calling .Setbool() on the animator itself, and not the networked one

#

Though i would most likely just make a hook like Укроп said and get rid of the networkanimator

hoary heart
#

Okay but now i have another problem, the doors are spawniong in a randomly generated dungeon (Im using DunGen) and that seems to make it so i cannot interact with the door (when i place it by hand in the scene it works fine)

https://pastebin.com/mMDyCrhH

hoary heart
open jungle
# hoary heart

I assume you're generating the dungeon on clients by passing them the seed. That's fine but clients have to skip adding the doors. Doors have to be instantiated on server only and NetworkServer.Spawn has to be called on them.

hoary heart
#

Yea that's what i've been doing, i will try that!