|
Tarek Kjeller
Registered User
Join date: 17 Aug 2008
Posts: 3
|
04-03-2009 11:43
Trying to work with the Loops system in LSL ins't exactly returning the desired effect im looking for. Is there a callback type function one could use that executes a script once per frame? Take for insance, in Flash Actionscript 2, we have: var entryPoint = function() { // this gets executed every single frame } this.onEnterFrame = entryPoint; i also knwo the C++ equivalent but its not coming to mind right now. If there doesn't exist one, how can i setup that loop function to run pretty much the same way? Like for instance, say i wanted to make a disco ball continue rotating on its own and keeps going for forever. Using the looping method all i get is quick snaps of rotation executed every half second 
|
|
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
|
04-03-2009 11:48
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
04-03-2009 11:49
well for the disco ball i would use llTargetOmega, it doesn't actually rotate the object as far as the sim/server is concerned, it just appears to rotate on the client's screen. actual continuous rotation, especially to make it look smooth would cause alot of lag
|
|
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
|
04-03-2009 11:53
Oh, and no, there is no general callback function. However, LSL is event-driven, and if you can set up either a timer or other recurring event ... for example, a collision, or receipt of an IM or email ... you can get similar functionality. However, buyer beware: scheduling precision is not LSL's strong point. .
|
|
Tarek Kjeller
Registered User
Join date: 17 Aug 2008
Posts: 3
|
04-03-2009 13:34
Alright thanks guys! this helps quite a bit actually 
|