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 / Turn the fog off!

Author
Message
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 7th Dec 2006 17:50
I believe Ben was the one who posted the script that used a triggerzone to turn the fog on.
Here is a script you can use to turn the fog off with a triggerzone.



I hope somebody finds it useful.

Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 8th Dec 2006 03:11
thanks, I was looking for something like this.


Get my Mega Segment Pack for free, be one of the first 5 to post
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 8th Dec 2006 11:01
Thanks FredP, That will definently help out my project.

RF

Locrian
19
Years of Service
User Offline
Joined: 21st Nov 2005
Location: Burton Mi.
Posted: 8th Dec 2006 22:06
Im sure this will help lots of people.
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 10th Dec 2006 07:48 Edited at: 10th Dec 2006 07:49
uhh... if fog=0 isn't it redundant to change the fog color?

And what is with the :state=0:blah:state=0? (not only do you not need to change the state back to 0 when it is zero... but you have a third colon in that line)

not insulting... just pointing it out...

Wisemen are hard to find, they are tarnished by sayings and quotes that are not of their true nature.
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 10th Dec 2006 10:17
It works...
and that's all that matters to me.

Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 10th Dec 2006 21:31
Cool FredP! My scripts are located here:
Quote: "http://forum.thegamecreators.com/?m=forum_view&t=71197&b=23"


One has a permanent fog in the level and the other has fog in zone only. The permanent one is only useful now when you're going to use different colors in different levels. When I wrote it the fog features in the build menu were still broken, I'm assuming they work now.

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Dec 2006 00:45 Edited at: 20th Dec 2006 00:46
Sorry to drag this up but I've been messing about with your fog scripts FredP, particularly this one:



This should activate fog when the player is in the zone (which it does) and turn it off when the player is out of the zone, which is where my problem lies, it doesn't, once the fog's activated, it stays on. I built a test level comprising of 3 levels and put a trigger zone on the bottom level after going down then back to the top level the fog was still active on all levels. I put the call to the script in the Main, is that correct?


FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 20th Dec 2006 01:20
I believe that is Ben's script but I am not sure.
Just from glancing at the script it appears there is no instruction in it to turn the fog off.


As you can see I modified xplosys' night vision script and now you can use this script to turn the fog on and off.
You can change the keys to turn it on/off and the types of fog as well.
I don't know how useful this will be but there it is.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 20th Dec 2006 01:28
To turn fog on/off in a level could be useful - like to turn it on outside and turn it off inside...did Lee make the fog hide the polies behind it yet [limit the camera view]? Maybe it was a command he added, I forget now.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Dec 2006 01:35
Quote: "I believe that is Ben's script but I am not sure."


Oops, don't know why I thought it was yours!

@ Airslide: Yes, that's what I want, to turn it on when the player reaches that level, this was basically for speed (not sure if fog slows things down), also just for a particular area.


FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 20th Dec 2006 01:36
Doesn't seem like he did to me.The fog isn't really thick enough (although it is a lot thicker than the v1 fog) to keep from seeing behind it.
I do wish FPSC only rendered certain parts of a level instead of the whole thing at once.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 30th Jan 2007 20:56
I'm having trouble with fog on/off, i've tried this with a trigger zone script but no fog is appearing:



Does this script work for anyone else?


FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 30th Jan 2007 21:34
Try this...


Note that fogred,foggreen and fogblue can have any numberic value from 1 to 255...I think.

Check and see if this works and if not please let me know.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 30th Jan 2007 21:45
I'd rather it not be in a zone as I want the fog to appear outside of an irregular shaped house, so when the player is anywhere outside, the fog is turned on (by passing through a door/trigger zone) and vice versa.


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 30th Jan 2007 21:56 Edited at: 30th Jan 2007 21:59
Nickydude,

If you place a single square zone just inside the door and another just outside the door it should work. When the player steps outside and touches the zone it will show fog, and likewise when the player steps inside and touches the zone, no fog. The only issue will be standing inside looking out or visa-versa.

Outside the door zone:

:plrwithinzone=1:fog=1,fogred=100,foggreen=100,fogblue=100

Inside the door zone:

:plrwithinzone=1:fog=0

Best.

I'm sorry, my answers are limited. You must ask the right question.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 30th Jan 2007 22:01
Nickydude,

If you place a single square zone just inside the door and another just outside the door it should work. When the player steps outside and touches the zone it will show fog, and likewise when the player steps inside and touches the zone, no fog. The only issue will be standing inside looking out or visa-versa.

Outside the door zone:

:plrwithinzone=1:fog=1,fogred=100,foggreen=100,fogblue=100

Inside the door zone:

:plrwithinzone=1:fog=0

Of course this is assuming that there is only one way in and out.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 30th Jan 2007 22:26
Ahh, with you now, thanks guys


Login to post a reply

Server time is: 2024-11-23 11:09:14
Your offset time is: 2024-11-23 11:09:14