Jump to content

[help] basic prefab script for original character


Recommended Posts

Hello!

 

I was hoping for some help on the script of my character since I'm pretty much no-good as a scripter.

 

What I'd like is the code for health, hunger, sanity, walking speed, hunger drain and sanity drain. I'd also like to know how to give them custom items to start with (in this case a torch/willows lighter and a backpack)

 

As far as I understand the only things needed to be changed should go under the "todo: Add an example special power here." tab

 

so far my code is:

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" ),}local prefabs = {}local fn = function(inst)-- choose which sounds this character will playinst.soundsname = "willow"-- a minimap icon must be specifiedinst.MiniMapEntity:SetIcon( "wilson.png" )-- todo: Add an example special power here.endreturn MakePlayerCharacter("wod", prefabs, assets, fn)

Yeah yeah I'm taking the lazy route and calling it wod but its for my SO who isn't going to use any other mod at all.

 

 

If someone was to help me with this code (and preferably put it all into a finished script so I won't be able to screw it up) the least I could do is offer to do a big-portrait art of one of your characters or something to thank you

 

example:
ZERn52E.png?1

 

 

Link to comment
Share on other sites

 

 

 

If someone was to help me with this code (and preferably put it all into a finished script so I won't be able to screw it up) the least I could do is offer to do a big-portrait art of one of your characters or something to thank you

 

 

I would gladly help you.

Do you have a steam I could contact you in?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...