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.

FPSC Classic Scripts / Working Fog!!!

Author
Message
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 7th Feb 2006 14:47
Thanks to a pointer by Mike from TGC I was able to get Fog working. Until now I've only tried it through the Global Script settings, which doesn't seem to work at all. He suggested to try it in a script and after a while I did get.... FOG!!

It's very simple to get, I'll post two scripts here for Fog. Both of these scripts are related to a Trigger Zone. First set up a Trigger Zone and then attach the script to Main of the Trigger Zone.

The first one is a complete level always on Fog. Place the Trigger Zone were the Player Start Marker is located and you will have Fog in the complete level all the time (even when the payer isn'in the Zone anymore).



This is a position dependant Fog. Place a Trigger Zone as large as you want, as soon as the player is in the Zone, Fog will appear. Once he's out of the Zone, Fog will dissappear.



Put the code in a text editor, save them indepentantly as fpi files and attach them to a Trigger Zone and you've got Fog. Change the fogred=255,foggreen=255,fogblue=255 to any number between 0-255 to get different colored fog. 0 = none of the color, 255 all of that color.

fogred=255,foggreen=255,fogblue=255 = white Fog.
fogred=0,foggreen=0,fogblue=0 = Black Fog (doesn't work to well).
fogred=255,foggreen=0,fogblue=0 = Red Fog.
fogred=0,foggreen=255,fogblue=0 = Green Fog.
fogred=0,foggreen=0,fogblue=255 = Blue Fog.
fogred=255,foggreen=255,fogblue=30 = Yellow Fog.
fogred=120,foggreen=120,fogblue=120 = Grey Fog.

The rest you can figure out by yourself.

Once note: the Fog is quite far away, you need a large room or hallway or open space to really get the full effect of it. It works in an open space as long as you enclose it with walls to see the full effect of the fog.

For the screenshot freaks, check the screenshot.....

MegaMusic Pack 01.... 31 original soundtracks for your games!
http://www.aeilkema.dds.nl/mega/index.html

Attachments

Login to view attachments
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 7th Feb 2006 15:51
Wohoo!

A game like Black in progress...
Nigezu
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location: Oulu, Finland
Posted: 7th Feb 2006 15:58
Thanks!
I should test does this work!

Intel Pentium 4 Processor 519 3.06 Ghz, 1536 MB DDR, Ati Radeon 9550 256MB
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 7th Feb 2006 21:40
Could you make it more enclosed?
so there will be a few feeth sight and then all white?

[href]www.freewebs.com/edromeproductions[/href]
look there for all my model packs latest updtes and other stuff!
(its not old yet)
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 7th Feb 2006 21:54
No you cannot. This is the way TGC has implemented Fog into FPSC and you can't change a thing about the way it appears. The only options are Fog or no Fog and Fog Color.

I've asked Mike if in a future update or version a Fog range can be implemented into FPSC also, but he hasn't affirmed it yet.

MegaMusic Pack 01.... 31 original soundtracks for your games!
http://www.aeilkema.dds.nl/mega/index.html
gps
19
Years of Service
User Offline
Joined: 16th Dec 2004
Location: England
Posted: 8th Feb 2006 00:31
Any fog is better than no fog at all

Nice work!

=ChrisB=
18
Years of Service
User Offline
Joined: 23rd Jun 2005
Location: starring into a viewfinder
Posted: 8th Feb 2006 18:54
Isnt there a fog range? or have i been reeding too much DBP stuff?
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 8th Feb 2006 18:57
Unfortunally in FPSC there isn't, but if it's in DBP it can become part of FPSC too!

MegaMusic Pack 01.... 31 original soundtracks for your games!
http://www.aeilkema.dds.nl/mega/index.html
Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 10th Mar 2006 15:23
NICE!!!
Now I can make KIller fog!!! Killzone, combined with a Fog trigger.....intresting...(or maybe no possible)

---->http://www.freewebs.com/lasse-b!<----Free segments!!
awesome lah
18
Years of Service
User Offline
Joined: 28th Feb 2006
Location: Depend on the season....
Posted: 22nd Mar 2006 10:27
Tried it and works fine. But, for my game I need thick smoke as my environment is a burning building. Tried the smoke decals but not realistic enough as it is puffing in sync. Need smoke to stay and smoke out the room. Any suggestions...?
awesome lah
18
Years of Service
User Offline
Joined: 28th Feb 2006
Location: Depend on the season....
Posted: 22nd Mar 2006 10:27
Tried it and works fine. But, for my game I need thick smoke as my environment is a burning building. Tried the smoke decals but not realistic enough as it is puffing in sync. Need smoke to stay and smoke out the room. Any suggestions...?
Weirdo123
18
Years of Service
User Offline
Joined: 22nd Dec 2005
Location: Gmod Build Server
Posted: 24th Mar 2006 00:16
????

Why do 2 post say the same thing, awsome lah??

100% Freak
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 24th Mar 2006 13:43
forum hiccup

JEEZ!You people just STFU! You waste more space complaining about people wasting space than the people your bashing! Man, I thought I had no life.
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 25th Mar 2006 01:34
burp, the word is fart

Mosillivo: Fires Rage, Earth Rumble, Evil Reigns, Cities Tumble
Join the NJL: The War Has Begun, Which Side Are You On?
Nunticaelitusphobic (Scared of Internet)
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 2nd Apr 2006 20:40
case AIACTFOG:
if aiactionseq(seq).value>0
fog on
if aiactionseq(seq).value>1
fog distance aiactionseq(seq).value,4000.0
else
fog distance 0.0,4000.0
endif
else
fog off
endif

As far as I understand, fog if you increase the value of 1, it will let you see further... but after 4000 units fog is not produced.

Mosillivo: Fires Rage, Earth Rumble, Evil Reigns, Cities Tumble
Join the NJL: The War Has Begun, Which Side Are You On?
Nunticaelitusphobic (Scared of Internet)
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 2nd Apr 2006 20:59
Mosillivo, you cannot put a different value then 0 or 1 for fog in FPSC. It's either on or off. You cannot set the units in FPSC.

As I stated before you can change it in DBPro, but not in FPSC. Even if it's in the source code, it's not doing anything in FPSC.

I'm assuming that you did put some of the FPSC source code here, but somehow it's not working as quoted.... as more of the coding seems to not work properly.

Bored of indoor? Add outdoor to your FPSC games!
http://megagaming.taken.to
Need music for your games? Check the above link also!
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 3rd Apr 2006 02:04
How the hell the fog object works is beyond me... but I do know that according to what is said, it would appear that something is suppose to happen, what, is unknown.

We all have our inner noob.
Join the NJL: We have MORE fun!
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 3rd Apr 2006 14:12
Stop changing names please.... that is too confusing.



That doesn't suprise me at all.

Bored of indoor? Add outdoor to your FPSC games!
http://megagaming.taken.to
Need music for your games? Check the above link also!
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Apr 2006 15:33
I think the problem might be that so much is tied into the camera range, like occlusion, that setting the fog distance would need a camera range change too. Like if you want a really dark scene, you'd set the range to 500 - basically 5 tiles before pitch black, and because the camera range wouldn't be changed, it'd run slow. It would give neat jet black silhouettes, fine if that's what your after.

I keep meaning to take a look at the FPSC code, maybe it'd be possible to make a quick fix for some of this stuff, camera range, fog, untapping the frame rate - stuff like that. If you know DBPro code adding custom elements like that would be easy - just forget script support unless you absolutely need it, and hack the settings in.

Like to get a 500 deep fog in DBPro:

FOG ON
FOG DISTANCE 500
COLOR FOG RGB(16,16,16)

Untested code, but that's it, no more complex than that.

Adding saving and loading support to FPSC is a different animal altogether, I don't relish that job.


Van-B

Put away, those fiery biscuits!
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 4th Apr 2006 05:32
Ben A, it is an unrefrenced command. I can read source and figure out what things are doing, but FOG is a part of dbp language...

Van B, This is confusing now.

As posted above, the fog distance command is allways followed by 2 variables. What is the 4000.0 doing?


P.S. What is hard about SL? You are just saving arrays. And I know that DBP has a SAVEARRAY command... (I need to see how that works...) I also know that the level is under the variable level. so, if you want to load a game before running a game you just change the level variable, and then after the game is finished loading, load the arrays back in place. (including a few varaibles, then you need to reposition the camera) Not an elegant way to do it, but certainly easy.

As I believe you have experiance in DBP, I do apreciate your reponses to this aproach. To me, it makes perfect sense, as I have lived in my perfect world when dealing with programming. Of course, I am finding that FPSC is more and more annoying then I thought.

We all have our inner noob.
Join the NJL: We have MORE fun!
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 4th Apr 2006 17:33
The solution doesn't sound to complicated, but unfortunally I do not have DBPro at all, I used to use DBClassic, but that is many winters ago.

But.... please do stay on topic, don't place your save/load opinion/comments in every thread I start, that's getting kind of confusing and messy, almost as messy as FPSC's source code can be.'

For now I'm curious what CB will come up with.....

Bored of indoor? Add outdoor to your FPSC games!
http://megagaming.taken.to
Need music for your games? Check the above link also!
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 4th Apr 2006 23:01 Edited at: 4th Apr 2006 23:02
Hey, Van B brought it up, and I was asking him for personal oppinion.

I still am curious what the second variable "4000.0" is doing.

We all have our inner noob.
Join the NJL: We have MORE fun!
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 4th Apr 2006 23:21
OnePost, you right, sorry, I must have overlooked it. It's all Van B's doing if this topic gets out of hand also

Bored of indoor? Add outdoor to your FPSC games!
http://megagaming.taken.to
Need music for your games? Check the above link also!
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 7th Apr 2006 16:56
*bump* this is valuable info!

Support your local Riker 9 Chapter.
JohannesM
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location: Espoo, Finland
Posted: 8th Apr 2006 08:14
It diddnt work. I copied all what was in the code snippet and then i put it into a .txt file and put it for the main of the trigger zone. diddnt work.

Go to http://download.filefront.com/4388817;086deb1580f3c7bf5bc79e9bf5004ff723f0d28aed24e63dad643e7155a12b54f4671f02640fbecf

For my demo game! (longer demo availabe soon)
Benjamin A
18
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 8th Apr 2006 12:00
Supah Gamer, it works great, but I would really suggest that you read the manual, especially if you put the code in a .txt file.

Bored of indoor? Add outdoor to your FPSC games!
http://megagaming.taken.to
Need music for your games? Check the above link also!
Nigezu
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location: Oulu, Finland
Posted: 8th Apr 2006 18:43
Quote: "i put it into a .txt file"

It should be in .fpi format!

Fog works fine whit me but character models loose their textures when fog is on.
They just look like black.

Intel Pentium 4 Processor 519 3.06 Ghz, 1536 MB DDR, Ati Radeon 9550 256MB
Neptune
18
Years of Service
User Offline
Joined: 8th Jan 2006
Location: United Kingdom
Posted: 9th Apr 2006 22:11
Here is a thought. Was just playing Call of Duty 2 and they have a lightning effect. All it seems to be is that the fog colour is just ramped up to white for a split second. Could this script be converted somehow to flash the fog to white randomly to create the effect of lightning? Maybe the fogdistance is too far though.
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 9th Apr 2006 23:24
actually, it is cheaper then that.

The HUD is changed white

There is a tutorial in a thread that is going to be bumped in a few min on hud images, the difference is that you want

:state=1,plrdistwithin=100:hudfadeout=myhud,state=2

We all have our inner noob.
Join the NJL: We have MORE fun!
When in doubt, blame a mod!

Login to post a reply

Server time is: 2024-04-26 14:16:04
Your offset time is: 2024-04-26 14:16:04