Jump to content

Force Ghost Skin?

Recommended Posts


I'm having trouble compiling a decent ghost .scml for my character so for now I basically just want to give up that part and force my character to use the same ghost build as the actual ghost mob.


local assets = {
    Asset("SCRIPT", "scripts/prefabs/player_common.lua"),
	Asset("ANIM", "anim/player_ghost_withhat.zip"),
	Asset("ANIM", "anim/ghost_build.zip"),
local function onbecameghost(inst)

This is what I had so far but obviously it doesn't work. Checked how beaver woodie does it and they use


any ideas?

Link to comment
Share on other sites

That's an interesting solution, but it might get a bit more complicated than that, since the ghost build might not share everything that the player ghost builds have. 

If you're really lucky and the ghost mob and player ghosts have identical banks, you can probably get away with just changing the build when they turn into a ghost.

inst.AnimState:PlayAnimation("idle", true) --start the idle animation

Otherwise, you'll need to add  inst.AnimState:SetBank("ghost")   into the mix and forgo any of the ghost player's animation bank, But I imagine this could have some unintended side effects...

I'd check to see if the regular ghost mob has all the same animations that the player ghosts do (haunting things, talking(?) doing whatever ghosts do) and all the same animation names. (you can generally find most animations in a mob's stategraph and do a search for "AnimState:PlayAnimation")

If the ghost is missing any animation names, your character will just become invisible for those animations.


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...