Raised This Month: $ Target: $400
 0% 

Detect trimping in scripts?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mediumq
New Member
Join Date: May 2016
Old 05-11-2016 , 23:26   Detect trimping in scripts?
Reply With Quote #1

I've just started familiarizing my self with amx scripting, so forgive me if this is a stupid question.

I'm trying to determine how to detect when a player double jumps off a ledge, or a ramp. Basically i'm trying to figure out how to tweak the physics so players can ramp slide, trimp again in TFC.

I haven't found a specific plugin that does that exactly. I've searched the forums and haven't found anything related to hl1 or TFC specifically.

Any help would be greatly appreciated.
mediumq is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 05-12-2016 , 13:12   Re: Detect trimping in scripts?
Reply With Quote #2

what do you mean about trimping ?
What is your problem Exct !
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
mediumq
New Member
Join Date: May 2016
Old 05-13-2016 , 11:26   Re: Detect trimping in scripts?
Reply With Quote #3

I was able to figure this out. By measuring on_ground height, before a jump, and on_ground height after a jump, i was able to determine if a player was jumping to a higher level. I was also able to determine the time of the jump, since things like trimping, and ramp sliding is typically a quick short jump. i was able to use both of these data points, to then calculate a proper jump height increase.

Code:
static Float:jump_height = 273.333

if(time_dif < 0.3){
    velocity[2] += height_diff / time_dif + jump_height+160
}else if(height_diff < 75 && time_dif < 0.5){
    velocity[2] += height_diff / time_dif + jump_height+140
}else if(height_diff < 105 && time_dif < 0.6){
    velocity[2] += height_diff / time_dif + jump_height+120
}else {
    velocity[2] += jump_height
}
leaving out some of the variable declarations, but that's basically the core logic.
mediumq is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-14-2016 , 02:51   Re: Detect trimping in scripts?
Reply With Quote #4

So . . . what is "trimping"????
__________________
fysiks is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 05-14-2016 , 18:57   Re: Detect trimping in scripts?
Reply With Quote #5

Quote:
Trimping = Quake technique that makes you jump higher if you jump on an inclined surface (e.g. a ramp). Some of your horizontal velocity is transfered into vertical velocity. This is not the same as sliding/rampsliding
__________________
gabuch2 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 18:39.


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