Jump to content

Need some advice about Transforming character


deadpillar

Recommended Posts

i want to make my character transform

 

when equip specific weapon. (and also come back when off the weapon)

 

 

so im thinking follow:

 

 

in character prefab.lua

 

Asset ( anim, normalform.zip)

Asset (anim, newform.zip)

---------

 

local function Normalform(inst)

 

inst.AnimState:SetBank("normalform")

inst.AnimState:SetBuild("normalform")

inst.components. health, sanity hunger damage etc...

inst

inst

.....

end

----------

 

local function Newform(inst)

 

inst.AnimState:SetBank("newform")

inst.AnimState:SetBuild("newform")

inst.components...

inst..

inst..

....

end

------------------------

 

please tell me if any wrong thing is here.

 

 

 

 

next, special weapon's prefab.lua

 

local function OnEquip(inst, owner)

(some conditions should be here to make the system decides

among function Normalform to Newform, i guess...)

 

end

-------

 

local function OnUnequip(inst, owner)

(some conditions should be here to make the system decides 

among function Normalform to Newform, i guess...)

 

end

--------

 

and i have no idea with how to make this concrete

 

 

sorry for my english

 

any help! 

 

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