|
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
|
06-17-2009 23:12
Is there a way I'm missing to test scripts that only perform an action when the sun sets or rises, aside from simply waiting for the sun to do so?
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-18-2009 06:56
From: Basement Desade Is there a way I'm missing to test scripts that only perform an action when the sun sets or rises, aside from simply waiting for the sun to do so? for testing you can replace your normal llGetSunDirection call with your own vector representing the time of day you want to test. a simple testing function would be gBooDebug = TRUE; gPosSun = < 0, 0, 1 >;
default{ touch_start( integer vInt ){ if (gBooDebug){ gPosSun = gPosSun * llEuler2Rot( < 0.0, 30.0, 0.0 > * DEG_TO_RAD ); } else{ gPosSun = llGetSunDirection(); }
llOwnerSay( "Sun Direction is " + (string)gPosSun ); } }
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
|
06-18-2009 15:26
Thanks, Void 
|