Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Prim move – Simple script help

Dragon Muir
Registered User
Join date: 25 Jun 2005
Posts: 60
11-10-2007 00:13
If anyone would be willing to post the most basic of prim moving script example, I would greatly appreciate it.

Example:
Cube – Move from point A to Point B.

That is all. The simpler the better, because I would like to examine it to learn from and then build upon it as I toy with it. A lot of the scripts posted do a lot of other things including the things I want, so it is difficult to isolate the core/heart of what I am looking for.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-10-2007 01:03
Try this...takes the current position & upon each touch of the object moves it 1m on x-axis, one on y-axis and one on z. :)

CODE


default
{
state_entry()
{

}

touch_start(integer total_number)
{
llSetPos(llGetPos() + <1.0,1.0,1.0>);
}
}

Dragon Muir
Registered User
Join date: 25 Jun 2005
Posts: 60
Debbie is awsome. :D
11-10-2007 12:47
Debbie you are awesome! You answered another one of my forum post questions. The example is perfect again! Your example will help me a lot to understand these functions. Thank you for explaining in English what the script says too. That makes it easier to see how and why. *hugs* ^.=.^

PS: These scripts make me smile. ^.=.^; I get to play with them and learn as if I am a child with a new toy. *laughs*
Adia Clary
Registered User
Join date: 13 May 2007
Posts: 4
adding on
11-13-2007 02:28
What if you want to have a touch button/prim to move the object 30 m way from the button and moves farther than 1 m? I know with Puppeteer, since everything has to be linked, and only objects can move 30 m away from the base prim. Is there anything that can be done with that? Also what if you want to move an object with a poseball on it?