Jump to content

Recommended Posts

Basically, I'm trying to make a mod for a friend of mine which will have him turn into the Moose Goose on a full moon.

 

The problem is, once he turns into the Moose Goose, you're unable to control him.

 

Heres the code for the player.

local MakePlayerCharacter = require "prefabs/player_common"local assets = {        Asset( "ANIM", "anim/player_basic.zip" ),        Asset( "ANIM", "anim/player_idles_shiver.zip" ),        Asset( "ANIM", "anim/player_actions.zip" ),        Asset( "ANIM", "anim/player_actions_axe.zip" ),        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),        Asset( "ANIM", "anim/player_actions_shovel.zip" ),        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),        Asset( "ANIM", "anim/player_actions_eat.zip" ),        Asset( "ANIM", "anim/player_actions_item.zip" ),        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),        Asset( "ANIM", "anim/player_actions_fishing.zip" ),        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),        Asset( "ANIM", "anim/player_bush_hat.zip" ),        Asset( "ANIM", "anim/player_attacks.zip" ),        Asset( "ANIM", "anim/player_idles.zip" ),        Asset( "ANIM", "anim/player_rebirth.zip" ),        Asset( "ANIM", "anim/player_jump.zip" ),        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),        Asset( "ANIM", "anim/player_teleport.zip" ),        Asset( "ANIM", "anim/wilson_fx.zip" ),        Asset( "ANIM", "anim/player_one_man_band.zip" ),        Asset( "ANIM", "anim/shadow_hands.zip" ),        Asset( "SOUND", "sound/sfx.fsb" ),        Asset( "SOUND", "sound/wilson.fsb" ),        Asset( "ANIM", "anim/beard.zip" ),		-- Don't forget to include your character's custom assets!        Asset( "ANIM", "anim/wod.zip" ),        Asset( "ANIM", "anim/goosemoose_build.zip" ),        Asset( "ANIM", "anim/goosemoose_basic.zip" ),}local prefabs = {}local function BecomeGoose(inst)    --local inst = CreateEntity()	local trans = inst.entity:AddTransform()	local anim = inst.entity:AddAnimState()	--local sound = inst.entity:AddSoundEmitter()	--local shadow = inst.entity:AddDynamicShadow()        MakeCharacterPhysics(inst, 5000, 1)        trans:SetScale(0.5,0.5,0.5)        inst.AnimState:SetBuild("goosemoose_build")    inst.AnimState:SetBank("goosemoose")    inst:SetStateGraph("SGmoose")        inst.components.talker:IgnoreAll()        inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED        local brain = require("brains/wilsonbrain")    inst:SetBrain(brain)        endlocal fn = function(inst)		-- choose which sounds this character will play	inst.soundsname = "wolfgang"	-- a minimap icon must be specified	inst.MiniMapEntity:SetIcon( "wilson.png" )	-- todo: Add an example special power here.        inst:ListenForEvent("nighttime", function(global, data)	    if GetClock():GetMoonPhase() == "full" then            BecomeGoose(inst)	    end	end, GetWorld())endreturn MakePlayerCharacter("wod", prefabs, assets, fn)

Any help would be great. I don't need him to attack, or anything else. Just to turn into it.

Does the Moose change orientation when a direction key is pressed? Or does it just sit there and do nothing at all? If the former, try commenting out the MakeCharacterPhysics and see if it works then.

 

If the later, it's possible that there are differences between the wilson and Moose stategraphs in how they handle character movement. Check those and the playercontoller component as well.

Thanks. It was the first one! Though he's a bit slow walking.

 

The other problem is (Which could be because I'm spamming GetClock():NextPhase() ) is when he turns into the Moose, he doesn't shut up and just keeps talking.

 

The other issue is when he eats or picks anything up he disappears/stops walking. 


Thanks. It was the first one! Though he's a bit slow walking.

 

The other problem is (Which could be because I'm spamming GetClock():NextPhase() ) is when he turns into the Moose, he doesn't shut up and just keeps talking.

 

The other issue is when he eats or picks anything up he disappears/stops walking. 


Thanks. It was the first one! Though he's a bit slow walking.

 

The other problem is (Which could be because I'm spamming GetClock():NextPhase() ) is when he turns into the Moose, he doesn't shut up and just keeps talking.

 

The other issue is when he eats or picks anything up he disappears/stops walking. 


Thanks. It was the first one! Though he's a bit slow walking.

 

The other problem is (Which could be because I'm spamming GetClock():NextPhase() ) is when he turns into the Moose, he doesn't shut up and just keeps talking.

 

The other issue is when he eats or picks anything up he disappears/stops walking. 

Right, so I attempted to just make a Null/Empty ActionButton to not be able to pick up anything, however pressing Space causes the game to crash.

Anyone have any idea how to fix this? Also attempting to increase the walk speed doesn't appear to do anything...

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