Jump to content
Sunbleached

Non-public to public vehicle script

Recommended Posts

Posted (edited)

Hi folks! What is the difference between non-public (owner only can drive) and public vehicle script? and how non-public to make public?

Edited by Sunbleached

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
Posted (edited)

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.

Edited by Qie Niangao
  • Thanks 1

Share this post


Link to post
Share on other sites

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. 

  • Thanks 1

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Or if you want to make it configurable

Private: If( id == llGetOwner())

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

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...