Inside3D!
     

frag flash
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
the bamph



Joined: 16 Apr 2006
Posts: 10

PostPosted: Sun Apr 16, 2006 10:46 am    Post subject: frag flash Reply with quote

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
View user's profile Send private message
RenegadeC



Joined: 15 Oct 2004
Posts: 370
Location: The freezing hell; Canada

PostPosted: Sun Apr 16, 2006 2:40 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
the bamph



Joined: 16 Apr 2006
Posts: 10

PostPosted: Sun Apr 16, 2006 5:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sun Apr 16, 2006 6:06 pm    Post subject: Reply with quote

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 Very Happy 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
View user's profile Send private message
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sun Apr 16, 2006 7:45 pm    Post subject: Reply with quote

woah, people still use Reaperbots?

FrikBotX rB all the way. Give it a go. Twisted Evil
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sun Apr 16, 2006 9:06 pm    Post subject: Reply with quote

"Damn, I'm good!"

http://www.inside3d.com/showtutorial.php?id=151

That will give you everything you need. Wink
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
RenegadeC



Joined: 15 Oct 2004
Posts: 370
Location: The freezing hell; Canada

PostPosted: Mon Apr 17, 2006 10:17 pm    Post subject: Reply with quote

Dr. Shadowborg wrote:
"Damn, I'm good!"

http://www.inside3d.com/showtutorial.php?id=151

That will give you everything you need. Wink


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
View user's profile Send private message AIM Address MSN Messenger
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Mon Apr 17, 2006 10:30 pm    Post subject: Reply with quote

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 Smile
_________________
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
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Tue Apr 18, 2006 4:34 pm    Post subject: Reply with quote

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 Smile


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
View user's profile Send private message
the bamph



Joined: 16 Apr 2006
Posts: 10

PostPosted: Tue Apr 18, 2006 6:28 pm    Post subject: Reply with quote

Dr. Shadowborg wrote:
"Damn, I'm good!"

http://www.inside3d.com/showtutorial.php?id=151

That will give you everything you need. Wink


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
View user's profile Send private message
the bamph



Joined: 16 Apr 2006
Posts: 10

PostPosted: Wed May 24, 2006 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Wed May 24, 2006 8:17 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Wed May 24, 2006 8:42 am    Post subject: Reply with quote

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
View user's profile Send private message
the bamph



Joined: 16 Apr 2006
Posts: 10

PostPosted: Wed May 24, 2006 1:02 pm    Post subject: Reply with quote

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! Smile
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Wed May 24, 2006 2:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group