Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

ScenEdit_SetWeather and numbers

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> ScenEdit_SetWeather and numbers Page: [1]
Login
Message << Older Topic   Newer Topic >>
ScenEdit_SetWeather and numbers - 6/23/2018 12:44:43 AM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
Undercloud is supposed to be 0 to 1.0 in .10 increments.

is it ok to pass in larger numbers like 1.2? it works great, it just gets treated as 1.0.

Also, I get really long decimals when I put in values - like 8/10 frequently becomes .799 or something.

Everything is working really well, it just chooses what ever is closest to an accepted value. Just seeing if this is unsupported or normal/approved behavior.

For example I modify the undercloud by .04 either up or down every xx minutes to give a smooth transition over time. So my undercloud values are never 1 decimal place. Being able to pass in 1.2 is great as it makes the bad weather last longer if my modifier is small. So at midnight a random number is generated between .7 and 1.2 and passed in to the undercloud- if you get 1.2 it will stay foggy for a long time.
Post #: 1
RE: ScenEdit_SetWeather and numbers - 6/23/2018 2:19:29 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
If it's working as expected and doesn't throw an error, then there's no problem.

The 8/10 returning .799 is unusual though. Happy to take a look at that, just post the scenario with the script in it (and let me know where to look)

_____________________________


(in reply to Whicker)
Post #: 2
RE: ScenEdit_SetWeather and numbers - 6/23/2018 2:36:31 AM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
try this in the cosole:

local x = 8/10;
ScenEdit_SetWeather(15,0,x,1);
local scenarioWeather = ScenEdit_GetWeather();
print (scenarioWeather);

I get undercloud as an 18 digit decimal. I can't post it as I am too new, it thinks it is a phone number.

(in reply to Rory Noonan)
Post #: 3
RE: ScenEdit_SetWeather and numbers - 6/23/2018 7:17:28 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
Yeah. That is weird. I'll add a ticket for the code guys to look into it.

Thanks for the heads up!

< Message edited by apache85 -- 6/23/2018 7:19:22 AM >


_____________________________


(in reply to Whicker)
Post #: 4
RE: ScenEdit_SetWeather and numbers - 6/23/2018 12:07:38 PM   
michaelm75au


Posts: 13419
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Will add some validation to the function to keep the numbers in the expected range.

_____________________________

Michael

(in reply to Rory Noonan)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> ScenEdit_SetWeather and numbers Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.348