Jump to content

skeleton size


Recommended Posts

Btw, I just noticed that it doesn't save the scale of the skeletons when you exit and rejoin the game. You can fix that easily.

AddPrefabPostInit("skeleton_player", function(skeleton_inst)
	local old = skeleton_inst.SetSkeletonDescription
	skeleton_inst.SetSkeletonDescription = function(self, char, playername, cause, pkname)
		if char == "melium" then
			local scaler = skeleton_inst:AddComponent("scaler")
			-- The scaler component automatically saves and loads the scale you set for it.
			-- Note that it scales uniformly when using SetScale(), so it only takes one parameter.
			scaler:SetScale(0.5)
		end
		old(self, char, playername, cause, pkname)
	end
end)

 

Oops, I had the inst's in there again. Fixed the problem in the code snippet above just now.

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