Jump to content

Custom Chester mod has morphing issues

Recommended Posts

Hi everyone. I've been working on a chester mod that allows him to morph into more forms, but I've hit a snag. The code that should allow him to morph isn't working and I can't put my finger on anything.


this is the file with the issue chester.lua

Edited by mf99k
Link to comment
Share on other sites

Line 225, 230, 247, and 280 should be: return false, false, false, false, false, false, false

Line 289 should be: local canShadow, canSnow, canGlow, canFire, canSane, canFast, canArmor = CanMorph(inst)


Lines 273-277 look fine.


Those are stickin' out more than anything.


With all of these types you might consider putting the morph functions in an array and having the canmorph return the first morphable form it finds to save on variable counts and speed up the script logic.

Or perhaps even rewriting the CanMorph function to return the morph function or nil, and check against nil elsewhere.

Edited by CarlZalph
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...