Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Moving Prim

Adey Bravin
Registered User
Join date: 18 Dec 2008
Posts: 4
05-07-2009 13:47
Hello,
I am new to scripting and was wondering how to have a physical prim move on its own within the bounds of a parceled piece of land. I have tried writing but unfortunately all my scripts move non-physical prims. Thanks for help in advance.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
05-07-2009 14:06
Can you tell us more about what you'd like? Like, is this an object that just wanders at random or do you want it to move to specific places?
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Adey Bravin
Registered User
Join date: 18 Dec 2008
Posts: 4
05-08-2009 10:56
From: Meade Paravane
Can you tell us more about what you'd like? Like, is this an object that just wanders at random or do you want it to move to specific places?


I was looking for it to move at random while staying in the confines of its parcel.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-08-2009 15:15
llApplyImpulse or llMoveToTarget to get the movement, llOverMyLand to check either if it's left you parcel (or if a move to target would put it outside that parcel)

llFrand for your randomness
you can apply direction as
llEuler2Rot( <0.0, 0.0, llFrand( PI )> );

not sure of the internal scale of rots offhand or I'd just have printed the random direction code for a rot which would look like
<0.0, 0.0, llFrand( X ), 1.0>
_____________________
|
| . "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...
| -
Adey Bravin
Registered User
Join date: 18 Dec 2008
Posts: 4
05-11-2009 09:16
From: Void Singer
llApplyImpulse or llMoveToTarget to get the movement, llOverMyLand to check either if it's left you parcel (or if a move to target would put it outside that parcel)

llFrand for your randomness
you can apply direction as
llEuler2Rot( <0.0, 0.0, llFrand( PI )> );

not sure of the internal scale of rots offhand or I'd just have printed the random direction code for a rot which would look like
<0.0, 0.0, llFrand( X ), 1.0>

Thanks alot. Will try