Jump to content

Simple touch and receive script needed


Mike30 Allen
 Share

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

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

Recommended Posts

I need a simple script that when the avatar touches the item, it is picked up automatically to go to their own inventory. If the item can reappear automatically by itself to do it again that's a plus. It will just be a simple game for my autistic son to retrieve items on his own land just with touching and not having any other prompts. Kind of like the Gold Coin rush thing but just for him to do with objects I will create for him to retrieve for his entertainment with no Linden value. He just enjoys the "hunt" himself without any competitions. Thanks for any help! 

Link to comment
Share on other sites

Simplest way to do it, I think, is to have the object contain a copy of itself, and then use llGiveInventory to give a copy to llDetectedKey(0) when your son touches it.

At the same time, the item sets itself invisible with llSetAlpha (or llSetLinkAlpha if it's made from more than 1 prim or mesh), and then sets a timer event for a to fire a few seconds later.

When the timer fires, turn the timer off and set the object back to visible.  You could also, if you wanted, hard code a list of different positions on the region and have it use llSetRegionPos to move itself to a new place each time it reappears.

Link to comment
Share on other sites

Actually, he wants it to just go into his inventory and then move onto the next one, then I'd put more out. I have no scripting knowledge, so if you could write it out for me to put into the object, that would be greatly appreciated!

Link to comment
Share on other sites

This forum is for people wanting help writing their own scripts.   If you want someone to write it for you, you should ask in the Wanted forum and you should find someone to write it.

Send me a PM if you have problems finding someone and I'll write it for you -- it's only a short thing.  But we try to keep this forum for help with scripts otherwise we'd be inundated with people wanting them written.

There's no function, though, to transfer a rezzed object directly to someone's inventory.   You have to have the object give a copy of itself and then turn invisible or delete itself.   But it can't change owners and move directly into the new owner's inventory.

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...