AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Env_fog questions (https://forums.alliedmods.net/showthread.php?t=184479)

Misery 05-05-2012 17:00

Env_fog questions
 
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

<VeCo> 05-06-2012 08:01

Re: Env_fog questions
 
Try with density 0.00175.

.Dare Devil. 05-06-2012 09:17

Re: Env_fog questions
 
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")

<VeCo> 05-06-2012 09:29

Re: Env_fog questions
 
Dispatch* works fine, just env_fog needs some weird values for density.


All times are GMT -4. The time now is 00:22.

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