Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

problems with a limitation using llMoveToTarget

wizzie Baldwin
Registered User
Join date: 23 May 2004
Posts: 52
07-13-2004 19:35
From: someone
Originally posted by Eggy Lippmann
This forum is too empty. I want more posts to read damn it!
Somebody get some noobies to ask scripting questions or something.
It's all your fault, cat. You and that blasted wiki of yours! Now the noobies have no questions to ask anymore!


OK! Here's a simple question.
I'm tinkering with a simple elevator.

so far i have been able to create one that responds to simple stuff like init, up, down, stop, d20 (set distance to 20) etc.

Here's some code snippets.
From: someone

integer distance = 10;
//initially i set the distance to some number
.
.
.
// this initial code to configure the elevator object
bottom = llGetPos();

top = bottom + <0,0,distance>;

llSetStatus(STATUS_PHYSICS,TRUE);
llSleep(0.1);
llMoveToTarget(bottom, 0.1);
llWhisper(0,"ready";);
.
.
.
if(message == "up";)
{
llMoveToTarget(top, 0.5);
}


everything works just fine... except that i can't put any value greater than 50 or 55 for distance. If i do then nothing happens.

Is there a limitation to how far llMoveToTarget can go?

I've seen elevators go much higher than 50 or so meters so perhaps someone could tell me where my approach is incorrect.

thanks ever so much =)
wizzie
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
07-13-2004 20:33
Move to target is limited to around there, yes.
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
07-14-2004 07:38
The problem is that all objects have a certian amount of "energy" in them. The bigger and object is, the more energy it has.

When an object tries to do something physical (move itself, move something else), it uses up some energy. If an object does not have enough energy in it when it tries to do something. Nothing happens.

So, when you call move to target with a large distance, the object tries to throw itself over there in the time you specified, and it does not have enough energy to do it.

The solution is to cover the distance in smaller steps. The will look better too, since the speed will be more even.
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
07-14-2004 08:16
Exact distance your encountering is the 64m limit.

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
wizzie Baldwin
Registered User
Join date: 23 May 2004
Posts: 52
hey all
07-14-2004 19:45
hi =)
wow thanks for the replys.. i did some research and saw the limit after i wrote the question.

thanks...
wizzie