Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
08-27-2009 11:20
I'm having trouble with using llGetPos() to make a vector. For instance this won't compile:
vector startpos = llGetPos();
I'm trying to get a vector target a set amount above a current position, such as:
vector destination = llGetPos()+<0,0,3800>;
Must be brain locked.
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
08-27-2009 11:35
From: Celty Westwick I'm having trouble with using llGetPos() to make a vector. For instance this won't compile:
vector startpos = llGetPos(); Is that variable global? Global variables can only be initialized to constants.
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
08-27-2009 11:39
yes it is
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
08-27-2009 11:51
You probably want to set the "start position" in state_entry() and on_rez().
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
08-27-2009 11:53
ah ok thx 
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
08-27-2009 11:57
I would also globally initialize it with an impossible position (<-1,-1,-1>  , so you can tell if it hasn't been set up in other events.
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
08-27-2009 15:22
aha good thought 
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
08-27-2009 19:12
interesting.....
we can post <1,2,3> but not <a,b,c> .... or at least now we can
_____________________
| | . "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... | - 
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
08-27-2009 19:27
< It's better then nothing and surprised someone actually did anything with it>
_____________________
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
|