|
Candy Ferguson
Registered User
Join date: 22 Jun 2006
Posts: 20
|
04-19-2008 18:06
Hi I'm trying to make an object move in .5m increments using, llSetPos(llGetPos() + <0,0,.5>  ; Is there a way to do it other than using multiple lines ie. llSetPos(llGetPos() + <0,0,.5>  ; llSetPos(llGetPos() + <0,0,.5>  ; llSetPos(llGetPos() + <0,0,.5>  ; llSetPos(llGetPos() + <0,0,.5>  ; please??
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-19-2008 18:24
Yep, something like this: vector offset = <0,0,.5>;
default { touch_start(integer total_number) { llSetTimerEvent(1.0); } timer() { llSetPos(llGetPos() + offset); } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-19-2008 18:29
Or let's say you just want to move straight up from whatever position you are at then you could do it like this and that would save from having to hammer the simulator with llGetPos() calls: vector pos;
default { touch_start(integer total_number) { pos = llGetPos(); llSetTimerEvent(1.0); } timer() { pos.z += .5; llSetPos(pos); } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Candy Ferguson
Registered User
Join date: 22 Jun 2006
Posts: 20
|
Thank you Jesse 
04-19-2008 19:10
Thank you Jesse 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-19-2008 19:12
From: Candy Ferguson Thank you Jesse  No problem. Love to see people learning!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|