Change sky.visibleDistance using scripts
by Leon · in Torque Game Engine · 12/10/2003 (9:03 am) · 2 replies
HOw could i get changed this value? i tried:
Sky.visibleDistance = "50";
but nothing..
thx.
Sky.visibleDistance = "50";
but nothing..
thx.
About the author
#2
Ah, in script code is:
12/10/2003 (9:51 am)
Thank you for the code, ill try it!Ah, in script code is:
Sky.updateVisibility(number);since you put ConsoleMethod( Sky, updateVisibility...
Torque Owner Sam Guffey
In sky.cc below the other console methods add...
ConsoleMethod( Sky, updateVisibility, void, 2, 2, "...") { object->updateVisibility(); }Then in scripts just do the following..
sky.visibleDistance = 50;
sky.updateVisibility();
Or in one shot..
//in sky.cc ConsoleMethod( Sky, updateVisibility, void, 3, 3, "( dist )") { object->setVisibleDistance(dAtof(argv[2])); } void Sky::setVisibleDistance(F32 dist) { mVisibleDistance = dist; updateVisibility(); } //in sky.h below ~Sky(); void setVisibleDistance(F32 dist);Then is scripts..
sky.setVisibleDistance(50);
Thats it.
Sam G