gwainalot Posted February 18, 2023 Share Posted February 18, 2023 Hi, Sim Crossing. This seems to be a bane of all vehicles but I have an issue which I can't find anything similar on the forums. On certain sim-crossings, the vehicle (a boat) will just stop. Totally dead. All the HMI type parts of the script are working but it simply doesn't listen to VEHICLE_LINEAR_MOTOR_DIRECTION & VEHICLE_ANGULAR_MOTOR_DIRECTION commands. Not even the VEHICLE_HOVER_HEIGHT is respected, the vehicle will just sit like a normal "dumb" prim without the physics model If I get out and back in (which forces the script to re-enable physics) it's still dead. If I reset the scripts - nothing. If I manually move the vehicle a few meters into the new sim, or even back into the old sim and reset everything, still nothing. The only way I seem to be able get it to work again is to do a Take and then Re-rez the vehicle. It definitely seems to be something that I'm doing wrong as other vehicles I have don't seem to have this issue. Any more experienced vehicle scripters have any ideas? Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 18, 2023 Share Posted February 18, 2023 The best way to script for a smooth region crossing is to reacquire PERMISSION_TRIGGER_ANIMATION and PERMISSION_TAKE_CONTROLS when your changed event detects CHANGED_REGION. If you have messed up and lost permissions without requesting them again, your controls won't work. You'll also usually be unseated. Depending on how you are setting the physics state of the vehicle, losing permissions might also be responsible for making it immobile, I suppose. That's at least where I would start looking. Also, take a careful look at exactly what the script is doing on rez, to be sure that it's doing those same things on script reset. Link to comment Share on other sites More sharing options...
gwainalot Posted February 18, 2023 Author Share Posted February 18, 2023 hi, Thanks for the reply. As I said, I've even tried resetting the script and it still doesn't work. All the permissions are ok, in fact, it even happens if it's just a physics object without someone sitting on it! At a bit of a loss 😉 Link to comment Share on other sites More sharing options...
primerib1 Posted February 18, 2023 Share Posted February 18, 2023 9 hours ago, gwainalot said: It definitely seems to be something that I'm doing wrong as other vehicles I have don't seem to have this issue. Seems like that one vehicle has a buggy script. If you write the script yourself, make sure that the script is not 'trapped' in a state with no way out. 9 hours ago, gwainalot said: If I reset the scripts - nothing. Did you also restart the script? IIRC resetting the script doesn't restart it. Resetting cleans up all internal variables etc., but you have to additionally choose "Set script to running" (or something like that) before the script actually restarts. Link to comment Share on other sites More sharing options...
SeanMcDonald Posted February 19, 2023 Share Posted February 19, 2023 I have a (very old) shuttlecraft that uses the HC-1 flight script. It has a second short script to monitor physics and re-enable if a sim-crossing borks it. The vehicle is full perm. If you'd like a copy, message me here or inworld. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now