This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Add Fall Damage to Hunter?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 10:41   Add Fall Damage to Hunter?
Reply With Quote #1

I wrote and mod that gives fall damage to Hunters when they pounce but I think there should be a better way of doing it. Right now I have timers that start when they pounce, and it check to see if the height of the hunter stays the same. When it does stay the same ( In theory that means they landed) it will calculate the start distance and the end distance then gives damage to the hunter when they land. The problem is sometimes the timer wont catch them landing and it will multiply the distance off several pounces and kill the hunter out right. So does any one know a better way giving fall damage to a hunter on a pounce? My mod is complicated and fails once or twice a round, which isn't bad I guess. But there seem there should be a better way. Is there a hidden event when a player lands? On is there a way of enabling normal fall damage to hunters?
DrThunder is offline
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 15:36   Re: Add Fall Damage to Hunter?
Reply With Quote #2

I guess there isn't a easier way of doing this.
DrThunder is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-16-2009 , 17:46   Re: Add Fall Damage to Hunter?
Reply With Quote #3

Give it time, sometimes people don't check the forums every 5 hours. I'd help you out but I don't own L4D nor do I know what a hunter is.
__________________
Greyscale is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 07-16-2009 , 17:58   Re: Add Fall Damage to Hunter?
Reply With Quote #4

Have you tried changing their gravity while pouncing to see if you can get the desired outcome?
Wazz is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 07-16-2009 , 18:48   Re: Add Fall Damage to Hunter?
Reply With Quote #5

If you hook the ability_use for the hunter and get his location, then hook pounce_fail and check the location, you can get height change.
Thraka is offline
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 18:52   Re: Add Fall Damage to Hunter?
Reply With Quote #6

Quote:
Originally Posted by Wazz View Post
Have you tried changing their gravity while pouncing to see if you can get the desired outcome?
The way I have my mod now is when the player starts to pounce it starts a time that will check every tenth of a second if the height of the player does not change. So in theory when you are pouncing your height is always changing till you land. And that works most of the time. When it fails is when (This is just a guess but seem to be the problem) a player lands on a none flat surface and keeps moving, so their height is not constant. What I would like is to get rid of the timer altogether and have a more fool proof way of doing it. It seems like there would be a event for the hunter landing or a way just to enable the normal fall damage that the survivors take, but I have not found anything like that.
DrThunder is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-16-2009 , 19:42   Re: Add Fall Damage to Hunter?
Reply With Quote #7

Check for changes in velocity. I'm not that experienced with L4D but it should be possible.
pheadxdll is offline
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 21:01   Re: Add Fall Damage to Hunter?
Reply With Quote #8

Quote:
Originally Posted by Thraka View Post
If you hook the ability_use for the hunter and get his location, then hook pounce_fail and check the location, you can get height change.

I hook pounce_fail and made it print to chat when the event is fired and pounce_fail does not fire when a hunter lands.
DrThunder is offline
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 21:08   Re: Add Fall Damage to Hunter?
Reply With Quote #9

I put in display_game_events 1 in console and it looks like the last event to get fired is jump_apex. No event linked to landing.
DrThunder is offline
DrThunder
Member
Join Date: May 2009
Old 07-16-2009 , 21:29   Re: Add Fall Damage to Hunter?
Reply With Quote #10

Quote:
Originally Posted by pheadxdll View Post
Check for changes in velocity. I'm not that experienced with L4D but it should be possible.
how do you get current velocity?
DrThunder is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode