Raised This Month: $51 Target: $400
 12% 

Env_fog questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Misery
Senior Member
Join Date: Dec 2010
Old 05-05-2012 , 17:00   Env_fog questions
Reply With Quote #1

Hi,

I'm working on a weather experiment to implement later in a mod similar to Zombie Mod.
However I just cannot get the desired effect. Trying to reproduce a green fog with some decent density.

The fog code is contained in plugin_precache() right?

Code:
public plugin_precache() {
// [...]
	new entFog = create_entity( "env_fog" );

	DispatchKeyValue( entFog , "density" , "0.007" );
	DispatchKeyValue( entFog , "rendercolor", "0 255 0" );
	DispatchSpawn( entFog );
// [...]
}
I can see some mist on the ground, like some random smoke, but it's not dense neither green.
Increasing the density has no effect. Weird...

Is there something I miss?

Thanks,
Misery

Last edited by Misery; 05-05-2012 at 17:00.
Misery is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-06-2012 , 08:01   Re: Env_fog questions
Reply With Quote #2

Try with density 0.00175.
__________________
<VeCo> is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-06-2012 , 09:17   Re: Env_fog questions
Reply With Quote #3

fm_set_kvd(entFog, "density", 0.007, "env_fog")

fm_set_kvd(entFog, "rendercolor", "0 255 0", "env_fog")
or
fm_set_kvd(entFog, "rendercolor", {0, 255, 0}, "env_fog")
i dont know anymore how it goes


anyway if that not working there is anyohter way


static density[16], rcolor[16]
formatex(density, charsmax(density), "0.007")
formatex(rcolor, charsmax(rcolor), "0 255 0")
fm_set_kvd(entFog, "density", density, "env_fog")
fm_set_kvd(entFog, "rendercolor", rcolor, "env_fog")
.Dare Devil. is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-06-2012 , 09:29   Re: Env_fog questions
Reply With Quote #4

Dispatch* works fine, just env_fog needs some weird values for density.
__________________
<VeCo> is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode