SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
83 stars 17 forks source link

UI cannot control objects on the server #4437

Closed hyjhkt closed 3 weeks ago

hyjhkt commented 3 weeks ago

I have placed ActivationEventHook on the UI to enable Object, which will take effect in single player mode and not on the server @1%%JRNM4GWJU3ZGC$S}NNL Q17J$8LRD%~I7{N@NR3 DC2

I want UI to send NpcGlobalEventMessenger, but UI cannot send events on the server TK178YUW`WKFL4Q_$8)0%BK

DanielWillett commented 3 weeks ago

UIs do not get spawned server-side if that's what you mean.

hyjhkt commented 3 weeks ago

UIS不会产生服务器端,如果你是这个意思的话。

The UI can only be controlled by scripts on the server, but I want the UI to control objects

DanielWillett commented 3 weeks ago

Are you trying to control a projectile with a UI? That's not really possible with the way projectiles are replicated. You could use plugins to simulate a projectile using effects.

SDGNelson commented 3 weeks ago

NpcGlobalEventMessenger can only instigate events when running on the server-side, sorry. Since the UI only exists on the client, not the server, it cannot rely on that component existing in the UI on the server.

That said, it sounds/appears this is more-so about the particular setup, whereas this repository is intended for bugs/crashes/issues/etc in the game rather than modding assistance, sorry.