jump.tf Forums
Welcome B)

Bounce Alert

nolem · 11 · 7077

nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Bounce Alert

This SourceMod plugin is more or less an extension of bcheck, but it is approached in a very different way. This plugin allows for you to check for a possible bounce, crouched or uncrouched, while you are moving in the air. It does not take the height that you are standing at and determine what types of bounces you can do (ex. ctap uncrouch, walk off crouch) like bcheck does.

This plugin takes your velocity, position, and the position of a surface, and calculates in real time what bounces are possible, if any.

You can check for the bounces in 3 ways:

Registered panels: Using the ba_reg or ba_register command while pointing at a surface, you can register that height. Then, to determine if you can bounce off of it, use ba_man or ba_manual. To delete the registered panel, use ba_del or ba_delete. This I limited because each user can only have one registered height at a time and you have to ba_reg each time, but it still might have some purpose.
Directly beneath you: The command ba_below or ba_bel will let you know if you are capable of bouncing off of the platform below you.
Where you are aiming: The command ba_loc or ba_location will let you know if you can bounce off of the platform you are looking at.

Just bind whichever these commands you find most useful to an unused mouse button or whatever you feel like and press the bind while you are moving following the instructions above and the plugin will tell you in chat "CROUCHED", "UNCROUCHED", or "CROUCHED OR UNCROUCHED".


Another thing that came from this plugin - when I was testing I noticed that some ctaps didn't produce the same results with my plugin vs good ol' bcheck, so I started to think that my plugin was broken. But it turns out, there are multiple heights you can get from a ctap jump. For example, on tx 6, robs plugin says ctap uncrouched. My plugin sometimes would say uncrouched when you test and sometimes would say crouched. That jump, depending on the ctap itself, can be done both crouch and uncrouch ctap bounce, even though bcheck doesn't list the crouched. This is the only ctap I could find that produced crouch and uncrouch depending on the ctap, all the other ctap bounces (ex. jump_bounce 4 or 5) alternate between crouch/uncrouch and no bounces. I think this happens because of either the length of the crouch, or the time between uncrouch and jump, or maybe both.

Let me know if you had any questions or find any bugs - this plugin was only tested multiplayer with up to 3 players, and rarely any map changes or anything that might affect the plugin.

Thanks to: Jamien for spreadsheet, Rob for bcheck and ideas about the plugin, as well as testing. Also thanks to guyyst for testing and zigzati for testing every uncrouch bounce  8)

If you are interested in the physics or any aspect of the plugin, I spent a great deal of time commenting the code, and it provides a decent description of how the plugin works. Beware though, this was my first time with sm, so my code is really terrible.

Plugin+Source: http://www.mediafire.com/download/301pofz51471kil/BounceAlert.rar

Edit: Made a plugin to test the bounces. It's just a save plugin but it saves velocity and angles too and lets you do it in midair. I just save when my plugin detects a bounce and test until I can get it to work. So far I've only not been able to do one, and I think that's because I'm bad, not because of the plugin.


Known Problems:
  • I just realized that this plugin won't work if the plat you are trying to bounce on has nogrenades so in other words it wont detect bouncehops on platforms that you can't - not sure if I feel like fixing.
« Last Edit: November 23, 2014, 12:39:15 AM by talkingmelon »


obsidiian

  • Administrator
  • Proficient
  • *****
    • Posts: 337
    • Frags: +1/-0
    • View Profile
Sounds really cool, can't wait to give it a try and look like I hit lots of random bounces on purpose  8)


Melon

  • Proficient
  • ****
    • Posts: 384
    • Frags: +0/-0
  • cool cats club
    • View Profile
Awesome job mate, I used to bind bcheck to shift for midair bounces, hoping this works better ;)


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Let me how it works for you! I've had a kind of difficult time testing this because getting lucky bounces is hard, both because getting the perfect heights is difficult and because when you do, doing a bounce at a height you don't know is difficult. The few lucky bounces that I've been able to get while working on it were all detected, but I just need more testing. I think I'm going to work on another plugin that saves your position and velocity so that you can save midair and test the same theoretical bounce height/velocity combos. That shouldn't take me too long.
« Last Edit: September 30, 2014, 07:50:27 PM by talkingmelon »


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Updated BounceAlert to version .2
It now recognizes crouchwalk bounces properly and shouldn't show unrecognized command anymore. Still not sure if I should make it work for nogrenades or not or if I'm gonna feel like adding that.

Still at the same link but here it is again: http://www.mediafire.com/download/301pofz51471kil/BounceAlert.rar

Edit: Just realized that I forgot to remove something I was using for debugging in the code - just prints some stuff to server console. Not a big deal but if that bugs you I'll fix it at some point.
« Last Edit: October 22, 2014, 09:51:52 PM by talkingmelon »


ReMaXeD

  • Intermediate
  • ***
    • Posts: 175
    • Frags: +0/-0
  • Serious poster
    • View Profile
These plugins are awesome! thanks so much for sharing  ;D


879m

  • Proficient
  • ****
    • Posts: 402
    • Frags: +2/-0
  • Techa mengu, go!
    • View Profile
When I type ba_loc in console I get "cannot check bounces from rcon". I have no idea about anything to do with sourcemod help me.


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
When I type ba_loc in console I get "cannot check bounces from rcon". I have no idea about anything to do with sourcemod help me.

When you are running a listen server typing ba_loc in console will run it as if it was the server instead of a normal console command. To get around this use "say /ba_loc".


879m

  • Proficient
  • ****
    • Posts: 402
    • Frags: +2/-0
  • Techa mengu, go!
    • View Profile

buttperson

  • Newbie
  • *
    • Posts: 19
    • Frags: +0/-0
    • View Profile