Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Question about Nonphys flight and door scripting issues..

Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
11-13-2006 08:00
So basically the idea here is that I'm helping develop a nonphysical vehicle with my cohort in crime.

We've done a ton of stuff on the physical side, but this will be our first nonphysical vehicle, so we're rather enthusiastic about just tossing a prim button into the ship to add a feature versus a menu option on a touch menu.

The problem, however, is that everything works perfectly in the ship..the transporters, doors, fighter bay, rezzers, etc...Until you fly it around. After you fly the ship, or even while you're flying the ship, everything involving the doors seem to quit working at all. Even resetting the scripts in the whole ship won't work. The only solution is to drop a new copy of the ship.

Now when I say that they quit working, they do seem to receive the link messages from the buttons as they play the door opening sounds, and the fighter bay rezzes the 2 fighters in the bay, but the doors will not open.

The positioning for the doors is the same localpos stuff that we use on all our physical ships, and the nonphys flight is a slightly modified version that I believe is a freebie (I made it a bit more smooth-flying than it was initially)

I looked into the code to see if it could be messing it up somehow, and all it appears to do is change hidden_face color and alpha and the extra scripts poll these values to figure out what to do.

I took out my modifications and put fresh versions in, and this still did not fix it.

My buttons to open the doors just have a normal menu with open or close, and a lock feature to lock all the doors. It just sends simple link messages, the doors just listen for their particular message and they do their position and rotation changes accordingly. Very simple scripts...so why they would just play the sounds and not actually open is a mystery to me.

Now sometimes we have to try to start the ship twice to get it to work, but we simply attributed this to lag issues due to the grid problems. But for the life of me I can't figure out why the doors would break from moving the ship.

Does it have something to do with all the nonphys movement coming from the flight scripts? How could that affect a local rotation and movement commands in the doors? The doors are obviously getting the link messages or they wouldn't play the open/close sounds or rez the fighters...
Aryn Lassard
Registered User
Join date: 15 Apr 2006
Posts: 4
Possible solution
11-13-2006 13:09
Usually this means that the door is being moved more than 10 meters in a single llSetPos call, thus the prim ignores the new position. If you want to see what's going on, put in some debugging logic that tells you the old position, and then the new position calculated by the script (assuming you have the source to the door script).

As for why it would work in a physical vehicle vs. non-physical - no idea. Linked prims should behave like linked prims with respect to local positioning and rotation. Perhaps there is something different about the way you've linked your objects, or the rotation of the root prim.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
11-13-2006 15:37
Well...They're moving on average about 4m, and it's not even applying the llSetLocalRot...this is what confuses me..there's no reason why it shouldn't at least do the rotation.

Edit: after further testing..the doors mess up after doing a turn and not normal lateral movement...really don't see why a few scripts polling the alpha of a face would screw it up
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
11-13-2006 16:05
Hi, Tia!

Do the scripts work or fail after you rotate the ship manually? What about after you manualy restore ship orientation after rotating it via script?

If it fails after a manual rotation, and works after manualy restoring rotation created via the script, then it is clear that your door scripts have a dependancy upon the orientation of the vehicle, and need to be adjusted.

If it works after a manual rotation, or fails after manualy restoring the pre-script rotation, then you have other issues.
_____________________
  1. ninjafoo Ng Says:
    November 4th, 2006 at 7:27 am
    We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?

Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
11-13-2006 21:31
I'm using LocalRot and pos...orientation of the ship isn't an issue. I've spoken with other nonphysical vehicle makers and they've all had the same problem, tho I haven't gotten a clear answer as to what is needed to fix it.