Jump to content

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! 

 

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