hi guys,
I am a newbie person in scripting.I would like to know how i can move my avatar to a specific location like i build a room in SL and i want that my avatar move to some specific location in the room.
Thanks in advance
These forums are CLOSED. Please visit the new forums HERE
how to move an avatar |
|
|
zeshu123 Horsley
Registered User
Join date: 28 Jan 2009
Posts: 15
|
04-10-2009 10:19
hi guys,
I am a newbie person in scripting.I would like to know how i can move my avatar to a specific location like i build a room in SL and i want that my avatar move to some specific location in the room. Thanks in advance |
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
04-10-2009 13:13
if you're talking teleportation (like moving between rooms/floors) within the range of a sim, llSitTarget is your friend. (as are llSetSitText, llAvatarOnSitTarget, and llUnSit )
https://wiki.secondlife.com/wiki/llSitTarget if you're talking about something like move to this spot I'm looking at, then llMoveToTarget in an attachment is your friend. (and a handful of others depending on how you want to work it) https://wiki.secondlife.com/wiki/llMoveToTarget _____________________
|
| . "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... | - |
|
zeshu123 Horsley
Registered User
Join date: 28 Jan 2009
Posts: 15
|
04-13-2009 02:44
I would like to ask two things .
1.Could you please describe little bit more about attachments, we attach the scripts to the avatar or something like that. 2.I have two point let A and B.I want that avatar will move or walk from A to B how can i do that . Thanks in Advance |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-13-2009 07:46
I would like to ask two things . 1.Could you please describe little bit more about attachments, we attach the scripts to the avatar or something like that. You have two choices. You can attach any object to the av body at regular attachment points or you can attach an object to your screen as a Heads Up Display (HUD). Either kind of attachment may contain a script. HUDs are specifically designed as control devices for managing vehicles, communication, environmental control, or other features, so they always include a script. Study articles in the SL Knowledge Base at 2.I have two point let A and B.I want that avatar will move or walk from A to B how can i do that . Thanks in Advance Void gave you the answers to this question in the previous post. Study those links and write your script accordingly. If you want to walk from one place to another, of course, the answer is quite simple: you walk. |
|
zeshu123 Horsley
Registered User
Join date: 28 Jan 2009
Posts: 15
|
04-14-2009 11:04
hi guys,
This below code is working fine when prim is moving towards the avatar.But i need the other way like avatar should move towards the prim.Kindly tell me where i should make changes.Thanks for your time and suggestions key reqid; vector start; string name; integer targetid; integer number; vector startpos=<123.25,128.74,22.70>; vector stoppos=<119.70,124.73,22.71>; float speed=1.5; float braking=0.5; vector target; default { touch_start(integer total_number) { llSetPos(startpos); llSetStatus(STATUS_PHYSICS,TRUE); target=stoppos; llMoveToTarget(target,speed); llSay(0,"start from defulat going to l" ;llSensor( "",llGetOwner(), AGENT, 20, PI ); } sensor(integer total_number) { vector pos = llDetectedPos(0); llMoveToTarget(pos,speed); } at_target(integer number,vector outtarget,vector ourpos) { llSay(0,"arrived at stopos" ;llTargetRemove(targetid); target=startpos; llMoveToTarget(target,speed); } } |
|
Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
|
04-15-2009 02:05
the code you now have, has to go into either a hud or a wearable, then it will move the avi. Ok?
_____________________
BR ab
|