Jump to content

Recommended Posts

Posted (edited)

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[0]"),5); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[1]"),8); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[2]"),3); //int kts

This is how i set some datarefs, works in some but others are not affected.

Any suggestions? iam not using gizmo at the moment.

These turbulence refs are not affected at all????

Edited by meshboy
Posted (edited)

Looks like you're trying to write Integer values to datarefs that expect Floats.

Try this instead:


XPLMSetDataf( XPLMFindDataRef("sim/weather/turbulence[0]"), 0.5 );

Edited by Ben Russell
Posted

Hi, you are right, it is a float, but it wont work even if i set a float value.

I set three cloud values first. is that why no turbulence is showing?

I guess if the turbulence is set i will see the values in the weather window as i do when i set my cloud?

This is what i have, cloud works but nothing else.

//Set weather

XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_type[0]"),cloud0);

XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_type[1]"),cloud1);

XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_type[2]"),cloud2);

//0-1

XPLMSetDatai(XPLMFindDataRef("sim/weather/thunderstorm_percent"),0.7);

XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_turbulence_percent"),0.8);

XPLMSetDatai(XPLMFindDataRef("sim/weather/rain_percent"),0.6);

XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_speed_kt[0]"),0.5); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_speed_kt[1]"),0.5); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_speed_kt[2]"),0.5); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[0]"),5.0); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[1]"),5.0); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[2]"),5.0); //int kts

XPLMSetDatai(XPLMFindDataRef("sim/weather/rate_change_percent"),1.0);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...