Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

touch attach drop delete

Tarak Voss
Meanderer
Join date: 14 Oct 2006
Posts: 330
07-24-2007 22:44
I'm building a hoverboard type object (not an "official" vehicle).

What I want to do is when someone selects to ride it (ie. Touch and select
sit) - it becomes automatically attached to their feet and becomes their
property (I believe the prims then will not be counted) when they step
off (detach) the object is deleted and the script rendered useless. Is this
possible? If so how?
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
07-24-2007 23:05
Objects cannot be attached/worn by anyone but their owner.

Your best bet is to give them a copy of the item.
Tarak Voss
Meanderer
Join date: 14 Oct 2006
Posts: 330
07-24-2007 23:14
Sorry - yes they would be given a non-transfer copy and the delete is not essential - just a wish
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
07-25-2007 10:00
The delete on detach isn't difficult...

CODE


attach(key id)
{
if(id != NULL_KEY) // do your attach stuff
else llDie();
}



You can't run a lot of commands on a "detach"...but it is possible to sneak through with one or two things most of the time.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
07-25-2007 10:05
Attachment is not needed for what you want. The regular sit will work- Prims that are sat on do not count against a parcel. And you can delete it when they standup.
Tarak Voss
Meanderer
Join date: 14 Oct 2006
Posts: 330
07-25-2007 19:58
That's great! Thanks