Jump to content

Non-public to public vehicle script


Sunbleached
 Share

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

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

Recommended Posts

If you have the source for the script, it's usually not a big deal, just remove some checks in the CHANGED_LINK event (for when the driver sits on the vehicle) and possibly the touch-related event handlers. It can be a little trickier than that if the scripter lazily assumed the driver is always the owner (such as listening to the owner for menus, etc.) but that's fairly uncommon.

If on the other hand you don't have source for the script, you'll need to replace it. Physical vehicle scripts aren't that complex, really, once you understand how scripts handle controls, but they're insanely fussy, so it can be an exercise in patience.

(Of course this all assumes the vehicle itself is modifiable. If not, it's just garbage anyway.)

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Qie Niangao said:

If you have the source for the script, it's usually not a big deal, just remove some checks in the CHANGED_LINK event (for when the driver sits on the vehicle) and possibly the touch-related event handlers. It can be a little trickier than that if the scripter lazily assumed the driver is always the owner (such as listening to the owner for menus, etc.) but that's fairly uncommon.

If on the other hand you don't have source for the script, you'll need to replace it. Physical vehicle scripts aren't that complex, really, once you understand how scripts handle controls, but they're insanely fussy, so it can be an exercise in patience.

(Of course this all assumes the vehicle itself is modifiable. If not, it's just garbage anyway.)

Hi! Thank you so much for the answer!

May i ask what is script source?

Link to comment
Share on other sites

55 minutes ago, Qie Niangao said:

Oh, sorry, I guess "source code" is a kinda jargon term, meaning the ability to see the text of the program, which in Second Life script permissions also entails the ability to modify it.

 

27 minutes ago, Rolig Loon said:

As Qie says,  we can't tell you much without seeing the script,  but if you can read it yourself,  you should be able to make the small necessary changes with little trouble. It's pretty obvious coding. 

Thank you both very much! Yes I have permission to mod, even more, i got it from my vehicle script generator hud. And i d love to put a whole script here, but its 118 lines so only this. Could you help please, what should i remove?

changed(integer change)
{
    if(change & CHANGED_LINK)
    {
        key agent = llAvatarOnSitTarget() ;
        if(agent)
        {
            if(agent == llGetOwner())
            {
                llRequestPermissions(agent, PERMISSION_TAKE_CONTROLS);
            }
            else
            {
                llInstantMessage(agent, "You are not the owner!");
                llUnSit(agent);
            }
        }
        else
        {
            llResetScript();
        }
    }
}

(no touch events so far)

Link to comment
Share on other sites

I just removed a couple of lines and it works for public now!

changed(integer change)
{
    if(change & CHANGED_LINK)
    {
        key agent = llAvatarOnSitTarget() ;
        if(agent)
        {
        llRequestPermissions(agent, PERMISSION_TAKE_CONTROLS);
        }
        else
        {
            llResetScript();
        }
    }
}

 

  • Like 2
Link to comment
Share on other sites

4 hours ago, Kyrah Abattoir said:

Or if you want to make it configurable

Private: If( id == llGetOwner())

Public/Private: if(public || id == llGetOwner())

Hi! Thanks! Yes, of course, I would like to! But how it works?

I have come across versions in which you can give permission to others. Is this the case?

Edited by Sunbleached
Link to comment
Share on other sites

I was just giving a very simple logic check example, vehicles can normally be used by anyone code wise, there is little difference between the owner or anyone else.

What they typically do however is "refuse" to accept someone who is not their owner.

  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1766 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...