1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

x/1 != x?

Discussion in 'Ask a Coder' started by Smoke39, Jan 20, 2004.

  1. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    So I'm making this fog-match mutator, and I want the user to be able to provide a multiplier for the thickness of the fog. Everything's working, but when I try to modify the ZoneInfos and such, it acts as it the fog has been set to maximum thickness.
    Code:
    foreach AllActors( class'ZoneInfo', ZI )
    {
    	ZI.bDistanceFog = true;
    	ZI.bClearToFogColor = true;
    	ZI.DistanceFogColor = FogColor;
    
    	if ( ZI.IsA('skyzoneinfo') )
    	{
    		ZI.DistanceFogStart = 0;
    		ZI.DistanceFogEnd = 0;
    	}
    	else
    	{
    		if ( bRelativeDensity )
    		{
    			ZI.DistanceFogStart /= UserDensity;
    			ZI.DistanceFogEnd /= UserDensity;
    		}
    		else
    		{
    			ZI.DistanceFogStart = UserStart;
    			ZI.DistanceFogEnd = UserEnd;
    		}
    	}
    }
    
    The result of dividing DistanceFogStart and DistanceFogEnd by UserDensity seems to be equivalent to setting both variables to 0. I've even tried replacing UserDensity with 1 and got the same results, so there's definitely something funky goin' on there. Anyone got any ideas?
     
  2. SamMaster

    SamMaster Master of the Super Weapons

    Joined:
    Apr 13, 2000
    Messages:
    417
    Likes Received:
    0
    did you try out changing the "if (skyzoneinfo)" value portion?
     
  3. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    No. It seemed irrelevant. I also forgot to mention that setting UserDensity to 0 seems to produce the expected effect of no fog.
    Edit: Commented out the skyzone bit, same result (except that the skybox was unfoggy, of course). Grr.
     
    Last edited: Jan 20, 2004
  4. SamMaster

    SamMaster Master of the Super Weapons

    Joined:
    Apr 13, 2000
    Messages:
    417
    Likes Received:
    0
    try decimals or negative values?
     
  5. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    No luck. :(
     
  6. SamMaster

    SamMaster Master of the Super Weapons

    Joined:
    Apr 13, 2000
    Messages:
    417
    Likes Received:
    0
    damn... this goes beyind here I think. check up codng part of the BU forums
     

Share This Page