Nipi Posted May 9, 2017 Share Posted May 9, 2017 (edited) My error: Spoiler My lua file: Spoiler 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" ), Asset( "ANIM", "anim/mia.zip" ), } local prefabs = {} local start_inv = { -- Custom starting items } local fn = function(inst) -- choose which sounds this character will play inst.soundsname = "wendy" if not TheWorld.ismastersim then return inst -- Minimap icon inst.MiniMapEntity:SetIcon( "mia.tex" ) -- Stats inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(200) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 -- Hunger rate (optional) inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE -- Movement speed (optional) inst.components.locomotor.walkspeed = 8 inst.components.locomotor.runspeed = 10 end return MakePlayerCharacter("mia", prefabs, assets, fn, start_inv) Also added my file for download. Would really appreciate any help! I've spent so much time on this and I just cant bring myself to give up! mia.lua Edited May 10, 2017 by Nipi SOLVED Link to comment Share on other sites More sharing options...
CarlZalph Posted May 9, 2017 Share Posted May 9, 2017 if not TheWorld.ismastersim then return inst end Link to comment Share on other sites More sharing options...
Nipi Posted May 9, 2017 Author Share Posted May 9, 2017 5 minutes ago, CarlZalph said: if not TheWorld.ismastersim then return inst end Thank you for the quick response but it seems a new error is occurring >_<;;; Spoiler Updated Code: Spoiler 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" ), Asset( "ANIM", "anim/mia.zip" ), } local prefabs = {} local start_inv = { -- Custom starting items } local fn = function(inst) -- choose which sounds this character will play inst.soundsname = "wendy" if not TheWorld.ismastersim then return inst end -- Minimap icon inst.MiniMapEntity:SetIcon( "mia.tex" ) -- Stats inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(200) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 -- Hunger rate (optional) inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE -- Movement speed (optional) inst.components.locomotor.walkspeed = 8 inst.components.locomotor.runspeed = 10 return MakePlayerCharacter("mia", prefabs, assets, fn, start_inv) Link to comment Share on other sites More sharing options...
CarlZalph Posted May 9, 2017 Share Posted May 9, 2017 inst.components.locomotor.runspeed = 10 end return MakePlayerCharacter("mia", prefabs, assets, fn, start_inv) Link to comment Share on other sites More sharing options...
Nipi Posted May 9, 2017 Author Share Posted May 9, 2017 Thanks so much I managed to get it working! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now