View previous topic :: View next topic |
Author |
Message |
the bamph
Joined: 16 Apr 2006 Posts: 10
|
Posted: Sun Apr 16, 2006 10:46 am Post subject: frag flash |
|
|
hello everyone, i've just started modifying my quake and reapers and
i was wondering if it's possible to make the screen flash green (or any color) for a fraction of a second when you frag in multiplayer (like the quick yellow flash that appears when you get an item/weapon/backpack)
i'd like to use this with the Reaperbots
it's not that important, but i think it'd be cool to have |
|
Back to top |
|
 |
RenegadeC

Joined: 15 Oct 2004 Posts: 370 Location: The freezing hell; Canada
|
Posted: Sun Apr 16, 2006 2:40 pm Post subject: |
|
|
Create a view weapon of one solid color, and have it flash on screen for a second; I did this for my TAoV mod when you do a large damaging attack .. here's some code from my mod!
.float screenflash_finished;
.float screenflash_mode;
framerate = cvar("host_framerate");
//
// screen flashing seizure effect
//
if (self.screenflash_finished > time && framerate == 0)
{
if (self.screenflash_mode == FALSE)
{
self.weaponmodel = "progs/scrflash.mdl";
self.screenflash_mode = TRUE;
}
else
{
self.weaponmodel = string_null;
self.screenflash_mode = FALSE;
}
}
else if (self.screenflash_mode == TRUE || framerate != 0)
{
self.weaponmodel = string_null;
self.screenflash_mode = FALSE;
}
Now simply set: self.screenflash_finished = time + #; on the player and your screen should flash! Anyway, you may have to modify that code a tad, but this should give you an idea! |
|
Back to top |
|
 |
the bamph
Joined: 16 Apr 2006 Posts: 10
|
Posted: Sun Apr 16, 2006 5:39 pm Post subject: |
|
|
hey
i have a few noob questions if you don't mind...
how can i make/where can i get a scrflash.mdl?
where do i have to insert this code? in the weapons.qc file? |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Sun Apr 16, 2006 6:06 pm Post subject: |
|
|
Alright that does it, I'm gonna make a proper tutorial regarding PROPER screenflashes using v_cshift.
EDIT: Code finished and tested. Now to write the tutorial and put it up I've also tested it with savegames, and it works fine, so it's all cool. _________________ "Roboto suggests Plasma Bazooka."
Last edited by Dr. Shadowborg on Sun Apr 16, 2006 8:24 pm; edited 1 time in total |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
|
Back to top |
|
 |
RenegadeC

Joined: 15 Oct 2004 Posts: 370 Location: The freezing hell; Canada
|
Posted: Mon Apr 17, 2006 10:17 pm Post subject: |
|
|
Good job! I generally stay away from stuffcmd myself however yours is friendlier and does the job fine. Congrats!
I'm not newbie friendly, I like to just post code and then have people figure what to do from there .. with QuakeC it's not hard. |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Mon Apr 17, 2006 10:30 pm Post subject: |
|
|
That might blow up if you're doing multiplayer though... (not sure to what extent though)
I know that if you tried that in QW it would probably blow up  _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe. |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Tue Apr 18, 2006 4:34 pm Post subject: |
|
|
Sajt wrote: | That might blow up if you're doing multiplayer though... (not sure to what extent though)
I know that if you tried that in QW it would probably blow up  |
Dunno. I don't really have the resources to test that kind of stuff, and besides, he never said it had to work with QW. Hell, I'm not even sure reaperbots will even work with QW.
Though... Anybody using stock QW these days probably deserves whatever happens when using this, as it quite obviously was intended for use with NQ engines. (Insert all legal crap pertaining to holding author harmless from all damages that result from using said stuff) _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
the bamph
Joined: 16 Apr 2006 Posts: 10
|
Posted: Tue Apr 18, 2006 6:28 pm Post subject: |
|
|
doesn't work with the reapers (yet)
i'll get back to you after i try some more things with it
thanks for replying everyone! |
|
Back to top |
|
 |
the bamph
Joined: 16 Apr 2006 Posts: 10
|
Posted: Wed May 24, 2006 6:58 am Post subject: |
|
|
ok, i tried Dr. Shadowborg's tutorial a few times and no matter what i changed, i still got this error message:
[noob]what can i do to fix this?[/noob] |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Wed May 24, 2006 8:17 am Post subject: |
|
|
1. Stop using ProQCC
2. If problem persists (doubtful) modify the line if (head.takedamage && head.classname == "player") to if (head.takedamage && (head.classname == "player")) _________________
 |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Wed May 24, 2006 8:42 am Post subject: |
|
|
Quote: | [noob]what can i do to fix this?[/noob] |
Most normal QuakeC compilers will only let you pass 8 variables to a function. The Palfrom function has 9, and so the last one isn't processed properly. That might explain why it came up with a weird line number...
But I'll echo what Frik said: Stop using ProQCC. The 2 main compilers used around here both overcome many of ProQCC's weaknesses... |
|
Back to top |
|
 |
the bamph
Joined: 16 Apr 2006 Posts: 10
|
Posted: Wed May 24, 2006 1:02 pm Post subject: |
|
|
FrikaC wrote: | 1. Stop using ProQCC |
yeah, that was the problem... i was using ProQCC cause it never gave me errors before, so i thought it was fairly good.
i compiled the code fine with FTEQCC though
i'm also getting FrikBotX and the FrikBot for Painkeep
thanks for the replies everyone!  |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Wed May 24, 2006 2:35 pm Post subject: |
|
|
Holy shiess, somebody still uses that outdated piece of crap that goes by the name of ProQcc?!
Well, anyway, I'm glad everything worked out, and that you're now using a proper compiler. =D _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
|