Sign in to follow this  
Purswader

How to add a new key function

Recommended Posts

Kzisor    1058

@Purswader, I got it all working as you would expect it to work.

 

The problem with the keyhandler not working on the client machine actually had to do with how you implemented it. You needed to place it in the commonpostinit function, instead you were putting it in the masterpostinit function.

 

The problem with the dog suit was actually the way I was doing the keyhandler. I couldn't figure it out with the way you were describing it however, after getting the code and looking at it I found the problem and tweaked your code to fix it.

 

 

RECAP:

Dog suit now works on both server and client by pressing the T key.

 

Share this post


Link to post
Share on other sites
Purswader    7

@Kzisor, infact i have another issue ;) . If you are dying in dog suite mode or mighty mode u cant resurrect.

 

EDIT:

I think it has something to do with the heatlh penalty and chaning max hp in the different states

Edited by Purswader

Share this post


Link to post
Share on other sites
Kzisor    1058

@Purswader, I'm sorry I'm not seeing the issue. I've died 6 times, once in mighty on the client and server, once in the dog suit on the client and server, and once normal on the client and server and was able to revive all 6 times using a taletale heart.

 

Are you trying to revive a different way or using a different method?

Share this post


Link to post
Share on other sites
Kzisor    1058

@Purswader, sorry I am only using your mod and I am not having any issue reviving and turning from normal to mighty or using the dog suit after on both client and server.

 

Everything is working on my end without any other mod enabled. 

Share this post


Link to post
Share on other sites
Purswader    7

@Kzisor, so i died several times in normal mode and had my max health set to 30, i pressed t, killed myself via console (like before), used the portal to resurrect and died imendiently but didn't get a ghost. post-440059-0-37146100-1421357675_thumb.

 

EDIT:

That skeleton right in the portal was me when i used the portal

Edited by Purswader

Share this post


Link to post
Share on other sites
Kzisor    1058

@Purswader, so that particular bug has to do with several things. There is a number of times which a character can revive under the health so it doesn't reduce more HP. Essentially what is happening is you aren't reaching that limit before you are reaching 0 health. You need to make sure to set the number of revives to the amount of times your normal mode can revive (3).

 

That should prevent this from happening, however, if it doesn't prevent it from happening I suggest disabling the dog and mighty mode below a certain amount of maximum health.

 

Have you tried dying without the dog suit more than 3 times?

Share this post


Link to post
Share on other sites
Purswader    7

@Kzisor, dying in normal mode over and over again is no problem cause i stole some code from rezecib that handles characters hp penalty with less than normal.

local function HealthPostInit(self)	local OldRecalculatePenalty = self.RecalculatePenalty	local function RecalculatePenalty(self, forceupdatewidget)		local mult = GLOBAL.TUNING.REVIVE_HEALTH_PENALTY_AS_MULTIPLE_OF_EFFIGY		mult = mult * GLOBAL.TUNING.EFFIGY_HEALTH_PENALTY		local maxrevives = (self.maxhealth - 30)/mult		if self.numrevives > maxrevives then			self.numrevives = maxrevives		end		OldRecalculatePenalty(self, forceupdatewidget)	end	self.RecalculatePenalty = RecalculatePenaltyendAddComponentPostInit('health', HealthPostInit)

but i guess i just give all modes the same health for now.

Share this post


Link to post
Share on other sites
Kzisor    1058

@Purswader, were you ever able to figure this out?

 

If not let me know and I will look into it further tomorrow. I'd really like to see if we could tackle this so that even if you are in mighty/dog suit while at minimum health you are able to still revive. I think I might know how to do that. 

Share this post


Link to post
Share on other sites

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
Sign in to follow this