CODE
timer()
{
time = time +1;
float timecolor = time/500;
vector agecolor= <1,1,1>*(timecolor);
llSetColor(agecolor,ALL_SIDES);
llSetText((string) agecolor + ".\n " + (string) timecolor + ".\n " + (string) time,<1,0,0>,1);
}
These forums are CLOSED. Please visit the new forums HERE
getting strange numerical returns |
|
Senuka Harbinger
A-Life, one bit at a time
![]() Join date: 24 Oct 2005
Posts: 491
|
12-07-2005 12:23
I'm getting 0 or <0,0,0> for the values of timecolor and agecolor eventhough the variable time is being returned as non zero. any ideas why?
CODE
_____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
12-07-2005 12:30
Try ((float)time)/500.0.
If time is integer it will do integer (time/500) and then convert the resulting zero to float. |