View Single Post
heliumdream
Senior Member
Join Date: Aug 2006
Old 06-07-2015 , 02:51   Re: Hero: Protoman (useless)
Reply With Quote #14

this was all bad. i took another look at it.
i have made changes and fixed it, mostly a complete re-write based off invisible man.

ultimately a neat alternative to godmode heroes like captain america.

note: you cannot shield lethal damage. unfortunately the hero cannot prevent damage, so you must survive the attack in order for your health to be reset.

fix: set_user_info can make the sh_extra_damage function inside superheromodule aware of an active protoman shield and perform a check before you die...for expert scripters; or post for help.

i have done this on my server and tweaked superheromod to support anubis and protoman.
my anubis implementation is a bit wonky; after learning how pev and set_user_info work i should be able to clean it up. reference: Superhero Show Damage

note2: does not block bullets - only checks for superhero damage; lasers, projectiles, explosions, etc. this was a flavor choice...
fix: you can remove gWpnindex if you would like protoman to check for bullets.

note3: bug - occasionally protoman will shield a bullet.
i have a known issue with my tweaked superheromod; it has a check inside sh_extra_damage to prevent protoman from taking lethal damage. this check has no way to detect if that lethal damage was a bullet or not and will deflect it anyway. there are other cases, outside of this known lethal damage check issue, where protoman will block a bullet. not exactly sure why.

Code:
// Protoman - Proto Shield has a chance to block projectiles while not moving, shooting, or zooming for x seconds

/*
//Protoman
protoman_level 10
protoman_delay 4.0      //Seconds a player must be still to gain proto shield
protoman_checkmove 1        //0 = no movement check only shooting, 1 = check movement buttons, 2 or more = speed movement to check
protoman_checkonground 0    //Must player be on ground to be shielded (Default 0 = no, 1 = yes)
protoman_chance 0.25   - % chance the shield will work

*/
Attached Files
File Type: sma Get Plugin or Get Source (sh_protoman.sma - 824 views - 9.4 KB)
__________________

Last edited by heliumdream; 06-11-2015 at 01:40. Reason: yet another fix.
heliumdream is offline