Catching flash
I would like to catch and block the flash. I have found a way to hook ScreenFade, but I think this one from ham is much more reliable, though I couldn't get it to work or I am doing something wrong. Tried to hook it as post and as pre:
PHP Code:
|
Re: Catching flash
Blind() is called from RadiusFlash(), at the end after all the stuffs done (Calculation/ScreenFade, etc.). What does Blind is to just to set some offsets to be used mainly for bots.
To block the flash, some random ideas : - blocking RadiusFlash() with orpheu/rage ; the best/efficient way. - grenade_throw() + check grenade type + blocking ScreenFade - grenade_throw() + check grenade type + hooking FindEntityInSphere and returning 0 + unhooking Though I say grenate_throw(), but would be better to be precise and hooking things when grenade is about to explode only, with pev_dmgtime. |
Re: Catching flash
Ok, that's stupid now...
So I will choose the most realiable way with Orpheu/Rage. I use both, but since I have no idea with both of them, but doing something with Orpheu is easier AFAIK, I will see what I can do with it. Thanks. |
Re: Catching flash
If you want to block for specific players, just block the ScreenFade message.
If you gonna block all flashes for a specific players you don't need to supercede Player_Blind, but if you want to block for example player A being flashed by player B, and then let player A being flashed by player C, then it is better to also supercede Player_Blind. |
Re: Catching flash
Alright gonna use ScreenFade then. Btw, would Orpheu even work for this? Since the function contains vector:
Quote:
|
Re: Catching flash
I don't see how orpheu could be usefull there.
If you want to prevent a player from using flash nades, just prevent him from buy some. |
Re: Catching flash
I never said anything about buying.
|
Re: Catching flash
Connor is right, was not remembering clearly the Blind code. RadiusFlash will loop for all found players ; if the purpose is per-player, hooking this function seems pointless.
You should explain what you want really to do. |
Re: Catching flash
I just want to block the flash effect for individual players.
Searched again for ScreenFade. (http://forums.alliedmods.net/showpos...19&postcount=2) PHP Code:
|
Re: Catching flash
You have to use register_message() to hook an event as pre. register_event() hooks as post, so you can't block since the event has been already executed.
|
| All times are GMT -4. The time now is 13:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.