Closed hyjhkt closed 1 month ago
https://unturned.info/Modding/ModHooks/ The chat hooks as stated above require special server settings, make sure those are applied. I've had these hooks work in past server side.
As for the other hooks wait for someone else!
https://unturned.info/Modding/ModHooks/ 如上所述的聊天挂钩需要特殊的服务器设置,请确保应用这些设置。我已经让这些钩子在过去的服务器端工作了。
至于其他的钩子等别人吧!
Thank you very much. I did not find this answer on. cs or elsewhere. Thank you for your reminder
https://unturned.info/Modding/ModHooks/ The chat hooks as stated above require special server settings, make sure those are applied. I've had these hooks work in past server side.
As for the other hooks wait for someone else!
"UnityEvents": { "Allow_Server_Messages": true, "Allow_Server_Commands": true, "Allow_Client_Messages": true, "Allow_Client_Commands": true }, This still doesn't work on the server, I don't understand...
"UnityEvents": { "Allow_Server_Messages": true, "Allow_Server_Commands": true, "Allow_Client_Messages": true, "Allow_Client_Commands": true }, This still doesn't work on the server, I don't understand...
Thanks ai-kana, that's correct.
@hyjhkt How do you have your components configured? For example, what object are they attached to?
@SDGNelson 1
I want ActivationEventHook to check the animal's Skeleton. If the animal is generated, send an event named 'Appearing Dreadnought Warrior' to the UI. Then the NpcGlobalEventHook of the UI detects the event and activates the sub UI。
I have tested many times and found that NpcGlobalEventMessenger cannot run on the server. however Interactivity Quest Interactivity Reports 2 Interactivity Report_0-Type Event Interactibility-Reward-0-ID appears as the fearless warrior Interactivity Report_1-Type Event Interactibility-Reward_1iD Death Fearless Warrior Interactivity Report_1_GrantDelaySeconds 3 This works on the server, so I don't think NpcGlobalEventMessenger can run on the server. I turned it on
@SDGNelson This is when I ask the cube to send an event to GameObject within five seconds. GameObject will generate an effect, which is valid in single player mode but not on the server
Thanks for the example. The reason is that by default the NPC Global Event Messenger only emits the event on the server. If you enable Should Replicate
it will be emitted on the client as well.
With that change, is it now working how you expect?
Note: SendEvent
only works from the server. i.e., clients cannot call SendEvent
.
@SDGNelson Does NpcGlobalEventMessenger work on animals? The layer is Entity and the label is Animal
There's no reason it shouldn't, however the _Dedicated
prefab is spawned on the dedicated server and the _Server
prefab is spawned in singleplayer.
Closing but feel free to comment and I will re-open.
Recently, I have discovered that many mod hooks cannot run properly on the server. I believe that currently there are NPC global event messengers, client text messengers, and server text messengers that cannot run on the server, but can run in single player mode.
Rocket Hook cannot cause damage to any object (player vehicles, buildings, obstacles, zombies, animals) on the server, and Kill Hook cannot kill on the server ![Uploading RU2BC13MN_55XD5H5(DFVLT.png…]()
As a MOD creator and server owner with two years of experience, I believe these are very important for technological changes and plugins can be omitted. I am a hyj who often sends you emails.