Jump to content

Wes animations on custom character


Recommended Posts

I'm trying to port a mod from DST to singleplayer, and it's going well except for one thing.

I can't seem to make my mod do Wes' animations when he inspects something, no matter how hard I try.

In DST, there's a tag you can put on a character that gives them mime speech, but there is no such thing here.

Any help would be much appreciated

 

The incomplete port in question: wesson ds.zip

The mod im trying to port (for reference) https://steamcommunity.com/sharedfiles/filedetails/?id=1220995567

Link to comment
Share on other sites

The issue here is that the stategraph in singleplayer DS checks if the character is Wes specifically. If the character is not specifically Wes, then they don't pantomime. You'd have to alter the Wilson stategraph, preferably with a post init. Start by taking the existing functions and having them run only if the character prefab does not equal your character's prefab. If it does, give it the same functions as Wes.


Edit: Try adding this to your modmain and giving the character the mime tag. If this doesn't work, try replacing "SGwilson" with just "wilson". If that doesn't work, you can at least take the concept and figure out how to make it work. :p 
 

AddStategraphPostInit("SGwilson", function(sg)
	local old_ontalk = sg.events.ontalk.fn
	sg.events.ontalk.fn = function(inst, data)
		if inst.sg:HasStateTag("idle") then
            if inst:HasTag("mime") then
				inst.sg:GoToState("mime")
            else
				return old_ontalk(inst, data)
			end
        end
	end
end)

 

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