Jump to content

Vehicle & sim crossing


gwainalot
 Share

You are about to reply to a thread that has been inactive for 575 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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

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

You are about to reply to a thread that has been inactive for 575 days.

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
 Share

×
×
  • Create New...