ScreenFade And How to Control it!
Code:
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, victimer) |
Better yet, can someone give me the file name of the include that gives more info on this? That is if there is an include, because I'm assuming messages arent included in anything, they just set half-life stuff.
|
HLSdk, Multiplayer Source/dlls/util.cpp, UTIL_ScreenFadeWrite:
Code:
MESSAGE_BEGIN( MSG_ONE, gmsgFade, NULL, pEntity->edict() ); // use the magic #1 for "one client"Code:
fade.duration = FixedUnsigned16( fadeTime, 1<<12 ); // 4.12 fixed |
Re: ScreenFade And How to Control it!
Quote:
That is called bit-shifting, and the math is basically: 1<<X 1 * 2 ^ X or 1 * 2 to the power of X Example: 1<<3 1 * 2 ^ 3 1 * 2 * 2 * 2 = 8 Also, I have been working on the ScreenFade myself for a new plugin Im making, I wrote this bit of code to test the different uses of the screenfade: Code:
Its usage is simple: amx_fade <time> <hold> <type> <r> <g> [b] <a> A good example would be: Fade Into Black: 9000 1000 5 0 0 0 255 Fade Back Out: 9000 1000 2 0 0 0 255 The 9000 gives it a nice long fade time, but in my experiments, anything over 9999 gave a shorter fade time.. weird... Also, I was trying to make one command do the same as both, Fade in, Hold fade, then Fade out... But it seems you have to Fade in, Hold and then Fade back out on your own.. |
Its because large numbers confuse the engine, and it sub's in its own.
|
| All times are GMT -4. The time now is 14:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.