Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Elevator script 'cramps' AV... :)

Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
06-29-2007 10:49
I've got an interesting thing going on with my elevator script...

The AV is requested to 'sit' on the elevator - when I receive the 'changed' event, I stop the animation 'sit' and start the animation 'stand'. This works when I enter the elevator at the ground floor, means, the AV stands wonderful on the platform...
But - when I enter the elevator in one of the top floors, and travel downwards, the legs and feet of the AV get 'cramped' up to the AV's Hips. I know that the Hips are kind of a reference point of the AV...
It only happens when I enter the elevator from a higher floor - when I enter it on the ground, I can travel up and down without this effect happening...

Weird...

A second thing - I use llMoveToTarget to move the elevator and at_target to check whether the elevator is at target or not. If it is at target, I use a llSay to tell the 'rider' that 'we arrived' and llStopMovingToTarget (I guess :) to stop the moving. This works fine, too, but once in a while when at target, I constantly get the 'we arrived' message, as if the llStopMoving--Command didn't work...

Any ideas? ;)
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-29-2007 11:17
It would be interesting to see if the "cramps" persist with a higher priority animation than the default stand (priority 0). But I can't see why it should work differently if the avatar boards at ground level, even if they later move downward over the same course followed by those who board at the problematic higher floors. So... the only other thing I can think of to try would be to push the llSitTarget() up a little higher off the floor of the elevator.

If the avatar doesn't sit at all, physical elevators have a tendency to make them "walk in place" when the cab moves... but if they're seated, that shouldn't be at all relevant.

For the at_target() repetition, I might try an llTargetRemove and a corresponding llTarget, as shown in the example in the at_target() entry of the lslwiki, http://www.lslwiki.net/lslwiki/wakka.php?wakka=at_target.
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
06-30-2007 01:55
The custom-animation indeed resolved the problem (priority 4)...
But actually, I'd rather use the built-in 'stand' animation... I'll fiddle around with it a little more, maybe I'll find out.

As for the repeating 'at_target' - I do use the llRemoveTarget as described in the wiki. This problem only occurs randomly so it is kinda hard to figure out where the problem is...
I'll be working on that, too... :)

Thanks for the help anyway!