Jump to content

Need help triggering a function on entitydeath event (Client Side Mod)

Recommended Posts

I've been making a mod (Client-only) which counts entities deaths.

The mod seemed to work fine while I tested it in local, on a self-hosted server.

Then, when I joined a dedicated server, it stopped working. The problem might come from the fact that I'm not the host (instead of it being the dedicated server's fault), I haven't tested it.

The thing is, I've set my player to listen to "entitydeath" events and trigger the entityDeathFn. But it never triggers when I've been connected to that dedicated server.

What have I done/understood wrong ? How can I correct it ?

Here's my modmain.lua below



Edited by Catoryu
Link to comment
Share on other sites

After a bit more investigating, It works when I launch a normal server as long as I don't add caves. When I add caves, my client and the server become separate and it doesn't work.
It also should not work if I login to any server, not just dedicated ones.

Edited by Catoryu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...