Jump to content

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

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)

 

Edited by Eusong

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