Author |
Topic: How to add FOG? |
|
|
[H]Ivan987 |
|
General Member Since: Jul 21, 2011 Posts: 24 Last: Mar 4, 2018 [view latest posts] |
|
|
Category: CoD2 General Posted: Thursday, Jul. 25, 2013 10:58 am |
|
I am really sad no one is able to help people here.
It is really easy to add fog to your map, you just need to add one line to your *.gsc file.
Should be same in COD2, this is from COD4:
Ni3ls writes...Quote: I told you what they mean.
Code: SetExpFog(startDist, halfwayDist, red, green, blue, transition time )
setExpFog(0.005, 0.05, 1, 1, 1, 0.7); /black
setExpFog(0.005, 0.05, 1, 51/255, 102/255, 0.7); //red
setExpFog(0.005, 0.05, 51/255, 102/255, 1, 0.7); //blue
setExpFog(0.005, 0.05, 51/255, 1, 102/255, 0.7); //green
I was wrong, you need to dived them by 255
http://www.colorspire.com/rgb-color-wheel/
There u can check the colours |
|
|
|
|
|
TexasRebel |
General Member Since: May 1, 2006 Posts: 373 Last: Aug 20, 2013 [view latest posts] |
|
|
Category: CoD2 General Posted: Thursday, Jul. 25, 2013 09:57 pm |
|
Not trying to offend or attack you SPi, but how long did you search for your problem. If none that may be reason why no one posted until Ivan did. I searched for adding fog, and found the same post Ivan is quoting from within a minute. Not saying dont ask questions at all, just perform a small search before and then make a post if you still didnt find anything or did but cant make sense of what was said. If this is out of line then feel free to remove the above paragraph.
With that said...
The small chunk of code in your gsc file adds fog at an offset from the player, so it is always present at that distance which will limit visibility of all players which is why .KILL3R. says it encompasses the whole map.
To get something more along the lines of fog in specific places around a map you would need to work with FX and scripting some more in your gsc file. You might even have to modify some FX to get the right look your going for in your map. This would just decrease the visibility of players near the FX. Which is what .KILL3R. was getting at within the same post Ivan quoted from.
http://modsonline.com/Forums-top-163753-10.html%23768016
everything is on first page of the above link |
|
|
|
|
Category: CoD2 General Posted: Friday, Jul. 26, 2013 09:07 am |
|
attachment: application(0.7Kb) |
TexasRebel, I understand and respect your points.
I actually searched only in the MODsonline Tutorials mostly for COD2 and a bit for COD4.
I didnt google (How to add fog in COD2) for example.
So I posted this topic.
However, I often deal with non-executing functions from my GSC.( i have issues on script)
for example, I call the array
wave_one targetname
and say want to wait untill they dead.
i found two functions that may do that. ( im not sure which on is the correct one)
wave_one waittill ("death");
or
waittill_dead(wave_one);
I tried both and the script just run passes the line like I never called it to waittill dead (i did not use both commands at once)
in cod4 the [waittill_dead(wave_one);] worked but after a few compiles, it stopped working.
I will send the COD2 script and please let me know.
Regards...
edited on Jul. 26, 2013 02:08 am by SPi |
|
|
|
3st0nian |
|
General Member Since: Jan 14, 2008 Posts: 291 Last: Dec 4, 2017 [view latest posts] |
|
|
|
Category: CoD2 General Posted: Friday, Jul. 26, 2013 11:33 am |
|
Code:
guys = [];
spawners = getentarray("foobar", "script_noteworthy");
for(i=0; i<spawners.size; i++)
guys[i] = spawners[i] stalingradSpawn();//Make reference to AI that spawns from spawner
waittill_dead(guys);
waittill("death"); can you use only on single entity, either vehicle or AI.
Also I suggest you read CoD2 Mod Tools documentation and zeroy.com/script.
And check out _utility.gsc. One can learn a lot from these sources. |
|
|
|
|
|
TexasRebel |
General Member Since: May 1, 2006 Posts: 373 Last: Aug 20, 2013 [view latest posts] |
|
|
|
|
|