Jump to content
Sign in to follow this  
Mike84

parameter bug when using floats as default value

Recommended Posts

There's a bug with the new parameter system when floating point numbers are being used as default param values.

part of my description.ext

class TimeOfDay // 0
{
	title = "Time of Day";
	values[] = { 5, 7, 12.5, 16, 19, 0 };
	texts[] = { "Early Morning", "Morning", "Midday", "Afternoon", "Evening", "Night" };
	default = 12.5;
};   

class Weather // 1
{
	title = "Weather";
	values[] = { 0, 0.5, 0.9 };
	texts[] = { "Clear", "Overcast", "Rainy" };
	default = 0.9;
};

And this is what you'll see in the parameter menu:

paramError.jpg

Value of paramsArray in-game (you can see it is rounding the value):

[12,1]

The funny thing happens when you set the settings yourself:

paramError2.jpg

Value of paramsArray in-game:

[12.5,0.9]

Thanks in advance,

mike

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×