Jump to content

Design pattern for plugin OBJECTS ?


Restless Swords
 Share

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

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

Recommended Posts

Is there a design pattern anyone has or knows about for implementing plugin OBJECTS?

For example, say I build a car.  I would like to have Plugable wheel objects (not just replacement wheel textures)

- the idea being that you could buy a new wheel plugin object, and drag it into the car object

- the car would accept the plugin object, and attach (link) it and move it to the right physical place

There seems like there may be too many issues, but I thought I would ask.

 

Link to comment
Share on other sites

3 minutes ago, Restless Swords said:

There seems like there may be too many issues

You've got that right.  Linking to an existing linkset means using llCreateLink.  The object and the thing you link it to must have the same owner and you must have mod perms on both, and your script must ask for PERMISSION_CHANGE_LINKS.  Then you will need to know or be able to calculate the local position and rotation for the newly linked object and you will need to hope that any scripts in the car will not be upset by changes in the linkset.   It would be a nifty scripting challenge, but I suspect that you would bang your head against the wall a lot.  :)

  • Like 1
Link to comment
Share on other sites

One way to do it in a simple way, is to hide/show fixtures - that is ,add two more wheel sets to a car and then show/hide the given wheel set .

Adds prim count/LI to a car - at least 4 prims for each set.  More complex wheels will be higher prim count. Redundant wheels scripts unless script injection is used or clever scripting of the wheel movements.  Also change of wheel size would require adjusting to the main prim for every change else car would either sink or float over road surface.

 

 

Link to comment
Share on other sites

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