Jump to content

Recommended Posts

Im having issues trying to figure this out, I have most of the coding done, but i cannot figure this out. Im new to lua. My situation is as follows: I want to make a character that when his insanity drops he changes his sprite, as in his anim/wod.zip. I think i have to use inst.AnimState:SetBuild("wod ")

Exactly, you'll have to have two zip files with the two builds and simply use that line to switch between the builds. Assuming you know how to create the zip files (which are basically the animations) you can take Goio as a good reference, you find him on the Steam Workshop by Lawrence Caustic Shadow.

I have both zips, but i cannot figure out how to make the character actually change between the two. I have looked at several examples of how to make this work including the were beaver, the strong dude, and a few mods that incorporate this effect, none of which i have been able to make work.

I have both zips, but i cannot figure out how to make the character actually change between the two. I have looked at several examples of how to make this work including the were beaver, the strong dude, and a few mods that incorporate this effect, none of which i have been able to make work.

Bu... bu... but you wrote the line... When you want the character to change you add the line in the appropriate place in the code:

inst.AnimState:SetBuild("special_state")

replacing "special_state" with the name of your build.

So where is the problem? Do you not know how to change the build name?

I have that down, now i need help in structuring the code itself. After observing several coding examples i see people using a function

 

local function make_human(inst)

 

and then calling that in the main part of the program where it applies assets

 

local fn = function(inst)

 

I just cannot figure out how to make this work, but i will look at that mod you suggested.

I have that down, now i need help in structuring the code itself. After observing several coding examples i see people using a function

 

local function make_human(inst)

 

and then calling that in the main part of the program where it applies assets

 

local fn = function(inst)

 

I just cannot figure out how to make this work, but i will look at that mod you suggested.

if you want to help, I simply want to make a character change his model when night falls and change back once its day again.

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