Newbrict / ObjHunt

A Good Garry's Mod Prop Hunt
Apache License 2.0
17 stars 21 forks source link

All props seem to have 100hp #75

Closed ZachLucasDev closed 8 years ago

ZachLucasDev commented 9 years ago

can't figure out why

Newbrict commented 9 years ago

can you check if the phone prop has 100HP, if so then this is indeed a bug, otherwise it is not.

ZachLucasDev commented 9 years ago

Phone prop has 20 HP. My apologies. However I think that this is a little much and small prop such as paint cans, axe, and sawblades all have 100 hp. I think that that a little much. I have been looking through the files for a way to adjust prop health but I am having no luck.

Newbrict commented 9 years ago

it's in init.lua

look for ply:Health()

ZachLucasDev commented 9 years ago

Ok I have have look through the code and the only thing I found with ply:Health() there was -- how damage to props is handled I have edited the value in the 3 locations there but it has done nothing. I feel like a complete noob right now but, I cant edit the health.

Newbrict commented 9 years ago

I clamp the health as well, somewhere :P

ZachLucasDev commented 9 years ago

Im sorry for pestering you about this but, Im not sure how to to make it work. I am very new to this and i'm learning as I go. This would heal a player [ply:SetHealth( math.Clamp( ply:Health() + 10, 0, 100 ) )] but How would I string this together to have the health of a prop be less then it already is? If I'm correct, this would be the line of code I would edit but would would need to be added? [ply:SetHealth( ply:Health() - dmg )]

Newbrict commented 9 years ago

add me on steam I can help you there.