Jump to content

Problems with character's transformation


Recommended Posts

So, I have recently created a character and I am having a problem. To begin with, the character's way to transform is through what time of day it is. So, if it isn't day time, then the character changes to his alternative form. This mod is working for me on my end, but I have been having trouble with it on a server. Whenever I choose the character to play as him, it works fine at first, but when it changes to dusk, my friend's game crashes. Although, it doesn't crash when only he plays as the character.

unknown.png
(Screenshot taken by my friend Link-n-Allie)

I've asked a friend who knows some coding, but he can't quite figure out how to crack this one. As for me, my game does just fine. So, I'm not sure what to do. I'll leave the lua file for reference and for fixing if needed.

ethan.lua

Link to comment
Share on other sites

that is kind of special character code, usually character mods look different :D

Anyway, your problem is obviously the server/client stuff.
In becomeKat() you already have a "if TheWorld.ismastersim then" cehck (which does check if it is the server). But in "onbecamehuman" you dont have it, resulting in a crash for clients when trying to access combat component, because clients dont have this component. So find out what is server and what is client and put the server stuff within another "if TheWorld.ismastersim then" statement.

Not the cause for the issue, but you should get rid of all DoPeriodicTask lines, most, or even all of them can be replaced by using the onisday watcher or events or other things or are redundant.

Edited by Serpens
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
 Share

×
×
  • Create New...