Changed Ken around again so he actually works and is very useful.
The Ken Masters power feels more like a real Shoryuken now. Notably we have taken the ironman jetpack and borrowed it for parts of the movement handling. We have modified the jetpack action to run in reverse when you start in midair, allowing for slick downward uppercut swoops. Use height to go faster and deal more damage. Full details below.
v 0.1.4 beta - May 21, 2015 - heliumdream
- added function distance_to_ground(id) to properly calculate player z-height. -credit: jimaway
- changed modified_shoryuken() to base its height off this new function instead of origin vec
v 0.1.3 beta - May 16, 2015 - heliumdream
- expansive usability update
- renamed "Ken Masters"
- cleaned up code; updated legacy calls; removed prethink and posthink;
- changed upcheight to thrust (and fixed it) and upcheight2 to vicheight
- remodelled script after the ironman jetpack hero, using it's movement to make the Ken Masters power feel more like a real Shoryuken.
- added gAirFlag and handling to recognize when your in midair; allowing for downward swoops
- moved explode_radius check from on keydown to ken_end.
- created modified_shoryuken() and switch cases for modifying global variables based on z-height (vec)
- note: the switch cases are hardcoded and use relative values. tinker at your own risk.
- note2: the z-height check is based on player origin; it cannot detect height above objects or your originated from a rooftop or platform. there are other jump height code solutions that compute height by vector and framerate, i found those to be super wonkey in terms of what i'm trying to accomplish. ultimately i'd like a way to check for and subtract the height of any object that traces beneath your x,y origin providing a more accurate z-height. i'm looking for suggestions on how to accomplish this; i will also post in script help.
v 0.1.2 beta - May 13, 2015 - heliumdream
- changed hero design for flavor
- added explode_radius check on keydown
- removed blink code, radius check allows for more friendly hit detection
- considering expansive usability update
v 0.1.1 beta - Jan 08, 2007 - heliumdream
- added blink code; users noted that the shoryuken was very hard to hit with otherwise
/* CVARS - copy and paste to shconfig.cfg
ken_timer 0.1 //How often (seconds) to run the loop 0.1
ken_duration 1.2 //How long the Shoryuken lasts 1.2
ken_thrust 125 //The upward boost every loop 125
ken_maxspeed 400 //Max x and y speeds (while in air) 400
ken_xymult 1.05 //Multiplies the current x,y vector when moving 1.05
ken_cooldown 6 // Must wait for # seconds till next shot is available (default 6)
ken_maxdamage 100 // Damage of uppercut (default 100)
ken_vicheight 380 // Max height of victim blown (default 380)
ken_radius 300 // Radius of effect if no Shoryuken victim (def=300)