Jump to content

Recommended Posts

I have two problems that I'm trying to address:

 

1.)  I'm using the Extended Character Sample as my template, and am trying to use Wendy's artwork for my mod, but my character becomes completely invisible (except for the shadow) when I include the following code:

local assets ={    Asset("ANIM", "anim/wendy.zip"),    Asset("SOUND", "sound/wendy.fsb"),    Asset("ANIM", "anim/ghost_wendyplayer_build.zip"),} 

 Any idea why this is happening?

 

 

2.)  I would like to give my character an AOE attack that only triggers during the night/evening while using melee weapons.  It would be a low damage attack (very similar to Abigail's) with a small AOE range.

 

Here is where I would like to add the code:

local function updatedamage(inst, phase)    if phase == "day" then        inst.components.combat.damagemultiplier = 0.75	inst.components.locomotor.runspeed = 5		    elseif phase == "night" then        inst.components.combat.damagemultiplier = 1.5	inst.components.locomotor.runspeed = 8		    elseif phase == "dusk" then        inst.components.combat.damagemultiplier = 1.25	inst.components.locomotor.runspeed = 7       		    endend

Any help would be appreciated.  Thanks!

Link to comment
https://forums.kleientertainment.com/forums/topic/56437-i-need-a-little-help/
Share on other sites

@lifestop,

 

1)

You load the assets, that doesn't mean the build is set correctly.

Without specifying anything, the build assigned is the one with the same name as the prefab.

To load Wendy and the Wendy ghost builds, in master_postinit:

	inst.OnSetSkin = function(inst, skin_name)		if not inst:HasTag("playerghost") then			inst.AnimState:SetBuild("wendy")		end	end	inst.ghostbuild = "ghost_wendyplayer_build"

2)

local function CoriolisEffect(inst, data)	local x, y, z = inst.Transform:GetWorldPosition()	local radius = 5	local damage = 20	local ents = TheSim:FindEntities(x, y, z, radius, nil, { "FX", "NOCLICK", "DECOR", "INLIMBO", "player", "playerghost" })	for i, v in ipairs(ents) do 		if v.components.combat and not (v == inst) then			v.components.combat:GetAttacked(inst, damage)		end	endendlocal function updatedamage(inst, phase)	if phase == "day" then		inst.components.combat.damagemultiplier = 0.75		inst.components.locomotor.runspeed = 5		inst:RemoveEventCallback("onattackother", CoriolisEffect)	elseif phase == "dusk" then		inst.components.combat.damagemultiplier = 1.25		inst.components.locomotor.runspeed = 7		inst:RemoveEventCallback("onattackother", CoriolisEffect)		inst:ListenForEvent("onattackother", CoriolisEffect)	elseif phase == "night" then		inst.components.combat.damagemultiplier = 1.5		inst.components.locomotor.runspeed = 8		inst:RemoveEventCallback("onattackother", CoriolisEffect)		inst:ListenForEvent("onattackother", CoriolisEffect)	endend

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