Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

wanted Notecard Giver upon arrival of land

LillyBeth Filth
Texture Artist
Join date: 23 Apr 2004
Posts: 489
09-06-2005 00:34
Hi.

I have some land that has 2 games and is listed under my stores name...in a nutshell ppl will arrive for various reasons.

I want a notecard dispenser that will auto give when some 1 lands on the parcel.

On the notecard will be 3 sections...rules for each game and LM & info about my store.

The only problem I imagine is the same ppl who come back for repeated events will get a tad sick of getting notecards each time they arrive...plus I wouldnt want ppl flying over my land to get smacked with a notecard either

This is the mission should you wish to accept it....this post will yadda yadda yadda


Can any-one help?


I will pay if its a time consuming pain mission or not a common script.


Thanking You!
_____________________


TRU Graphic Solutions Ltd
In Association with:
3DTotal.com - SubdimensionStudios.com - AmbientLight.co.uk - Jaguarwoman.com -Texturama.com - Fifond.com - 3DRender.co.uk

Over 80 SL freelance texture artist supplying Premium seamless textures to SL Since 2004

Visit TRU Website:
http://www.texturesrus.net
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
09-06-2005 00:44
It's trivial (2 lines of code). Put this into a small prim placed right on top of the arrival point/surface, along with the notecard:

CODE

default {
state_entry() { llVolumeDetect(TRUE); llSetAlpha(0.0, ALL_SIDES); }
collision_start(integer c) { llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_NOTECARD, 0)); }
}
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
a lost user
Join date: ?
Posts: ?
09-06-2005 15:07
CODE

default
{
state_entry()
{
llVolumeDetect(TRUE);
llSetAlpha(0,ALL_SIDES);
}

collision_start(integer num)
{
// If detected person has the same group ACTIVE that the object is set to, don't
// give a notecard to them.
if(llSameGroup(llDetectedKey(0)) == TRUE)
return;
// Don't give the owner a notecard
if(llDetectedKey(0) == llGetOwner())
return;

llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_NOTECARD,0));
}
}


This one is basically the same with the extra code to stop it handing out notecards to people in the same group as the object is set to. However, they must have the group active when they collide with the object for it to not give them a notecard. Also will ignore the owner of the object as well.

Just make the prim you are using for the detection big enough that people will walk/fly through it as they arrive. If you need to do it over a larger area, then you will need something a little more complex using a sensor that records who it has given a notecard to and all that kind of stuff. If you can use this "welcome mat" approach it is much more beneficial for the sim as a whole as well.