Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Red Death Screen...

Author
Message
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 23rd Apr 2005 03:24
On my fps i want a similar effect as halflife in which when an enemy gets close or hits you, a red screen flashes up to give the effect of you being hurt.

How could i do this?

Thanks in advance!

[href]http://forum.thegamecreators.com/m=forum_view&t=51573&b=8
[/href]
DBAlex
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 23rd Apr 2005 05:07
make a plain...color it red...lock it to the camera...ghost it...then only show it when you get hit:


maybe something like:


then just use show object and hide object...

easy


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Apr 2005 05:18 Edited at: 23rd Apr 2005 05:21
seen somthing like that on here think it was call flash had something to do with using the aphal command.

if I find it will post link might have code will have look.
written by Lee Bamber
found it


In Space No One can Hear You Scream! (When your comm Line is cut?)
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 23rd Apr 2005 06:55 Edited at: 23rd Apr 2005 07:03
Quote: "show object and hide object"


Ive tried:

show object 1
wait 2000
hide object 1

but this just creates major lag!

What could i do?

Also

I'm using a cube which is fixed to the camera to detect the collision between the camera and the zombie...but the cube just appears at the edge of my matrix..this is the code im using!



[href]http://forum.thegamecreators.com/m=forum_view&t=51573&b=8[/href]
DBAlex
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 23rd Apr 2005 07:09
why cant you just do something like:

2 being you and 3 being the zombie...



?


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 23rd Apr 2005 07:22
Ill give it ago!

CornStalks
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Utah
Posted: 23rd Apr 2005 10:24
You could just set the fog up close, color it red, and then reset it to however far away you want, and re-color it

Underworld 1020
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 23rd Apr 2005 11:46
Well, you could always just use my handy dandy FlashScreen function .

Try This:


Of course it will only work if your graphics card supports it, but you should be fine. However, if you can't get it to work then I'll make something else for you .

Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 23rd Apr 2005 19:31
Underworld....i tried it, but nothing happened??

Thanks anyway

DBAlex
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 24th Apr 2005 04:49
did mine work?


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
James Morgan
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 24th Apr 2005 08:51
Dark Flame
Quote: "
show object 1
wait 2000
hide object 1
"


This causes lag due to the [Wait 2000] command
If you were to experiment with the Timer() command instead, the loss in lag will be VERY unnoticable, if any lag at all.

James Morgan
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 24th Apr 2005 21:18
heres a simple damage flash routine, its a little messy but dinners about ready



hope thats some help.

Mentor.

PC1:XP, P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro, 6 way sound.
PC2: Linux, AMD 2ghz, 512mb ram, Nvidia GeForce4mx, 16 bit SB.
PC3: XP, laptop, intel 2.6ghz celeron, ATI 9000igp, 256mb
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 25th Apr 2005 02:57
Thanks mentor! Works!

Underworld 1020
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 26th Apr 2005 00:45 Edited at: 26th Apr 2005 05:15
@DarkFlame - Press the enter key when you run it . It should make the screen flash red five times, with a duration of one tenth of a second. But, if you go into the code you can change the color, amount of flashes, and also the duration.

Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 26th Apr 2005 02:22
Thanks dude!

Login to post a reply

Server time is: 2024-09-23 19:28:10
Your offset time is: 2024-09-23 19:28:10