NotAvailableToday Posted January 2, 2009 Share Posted January 2, 2009 Hi, I have a question. I want to make, if cj is hit by any weapon the screen fades red, like in call of duty or something like that. I realy don´t know how Thanks Link to comment https://gtaforums.com/topic/389655-screen-fades-red/ Share on other sites More sharing options...
Vicolaships Posted January 2, 2009 Share Posted January 2, 2009 Use this opcode to choose the fade color: 0169: set_fade_color_RGB 256 0 0 Red Green Blue, 256 is full 0 is empty, so here its a red fade Then you make a little fade like a flash: :CJ_hit 0001: wait 1 ms 00D6: if > Unknow Opcode < 004D: jump_if_false @CJ_hit 0001: wait 1 ms 0169: set_fade_color_RGB 256 0 0 // (red fade color) 016A: fade 0 time 0 0001: wait 20 ms 016A: fade 1 time 10 0169: set_fade_color_RGB 0 0 0 // (return to basic fade color) 0001: wait 100 ms 0002: jump @CJ_hit The unknow opcode is something linked with the fact to be hit, like : 031D: actor $PLAYER_ACTOR hit_by_weapon 51 But the problem with this one is that the fade will begin only if weapon 51 (not an other) is used on CJ. Bye and I hope to be helpfull Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058837509 Share on other sites More sharing options...
NotAvailableToday Posted January 2, 2009 Author Share Posted January 2, 2009 (edited) I know but I can use if or, can´t I? edit: The code won´t work :CJ_hit10001: wait 1 ms00D6: if 8184: not actor $PLAYER_ACTOR health >= 50 004D: jump_if_false @CJ_hit10001: wait 1 ms0169: set_fade_color_RGB 256 0 0 // (red fade color)016A: fade 0 time 00001: wait 20 ms016A: fade 1 time 100169: set_fade_color_RGB 0 0 0 // (return to basic fade color)0001: wait 100 ms0002: jump @CJ_hit1004E: end_thread Edited January 2, 2009 by Zombie.modder Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058837652 Share on other sites More sharing options...
[SM]CJZera Posted January 2, 2009 Share Posted January 2, 2009 Erm... does 256 even exist? RGB has a max of 255 as far as I know Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058837713 Share on other sites More sharing options...
Doomed_Space_Marine Posted January 2, 2009 Share Posted January 2, 2009 CJZera' date='Jan 2 2009, 21:36'] Erm... does 256 even exist? RGB has a max of 255 as far as I know Yes, because it starts from 0, not 1. Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058837807 Share on other sites More sharing options...
NotAvailableToday Posted January 2, 2009 Author Share Posted January 2, 2009 another question: Can I make a transparent fade ? :CJ_hit10001: wait 1 ms00D6: if 8184: not actor $PLAYER_ACTOR health >= 50 004D: jump_if_false @CJ_hit10001: wait 1 ms0169: set_fade_color_RGB 255 0 0 // (red fade color)016A: fade 0 time 00001: wait 20 ms016A: fade 1 time 100169: set_fade_color_RGB 0 0 0 // (return to basic fade color)0001: wait 100 ms0002: jump @CJ_hit1004E: end_thread i mean a red fade wich is transparent and never fade out Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058837808 Share on other sites More sharing options...
coin-god Posted January 2, 2009 Share Posted January 2, 2009 :FADEREDthread 'FADERED' jump @FADERED_96 :FADERED_18wait 0 1@ = Actor.Health($PLAYER_ACTOR)if and not Player.Wasted($PLAYER_CHAR)8741: not actor $PLAYER_ACTOR busted jf @FADERED_184 if 002D: 1@ >= 2@ // (int) jf @FADERED_111 if 801D: not 1@ > 2@ // (int) jf @FADERED_96 jump @FADERED_18 :FADERED_962@ = Actor.Health($PLAYER_ACTOR)jump @FADERED_18 :FADERED_1110169: set_fade_color_RGB 255 0 0 0062: 2@ -= 1@ // (int) 3@ = 1000 0072: 3@ /= 2@ // (int) 043C: disable_sounds_after_fade 0 fade 0 3@ wait 0 2@ *= 50 fade 1 2@ 043C: disable_sounds_after_fade 1 jump @FADERED_96 :FADERED_184wait $DEFAULT_WAIT_TIME jump @FADERED_18 From my mod. Biohazard Alert. Link to comment https://gtaforums.com/topic/389655-screen-fades-red/#findComment-1058838461 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now