Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Would like to create a logo and moving to another location code!

Adam Turk
Registered User
Join date: 24 Aug 2006
Posts: 44
08-24-2006 16:50
Now i would like to create a code that if placed in a building, would create a box with a logo in it that if clicked on would bring you somewhere else on the map of the "sl world".
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
08-24-2006 21:07
All you need is a landmark giver script. You can create the box and paste a logo onto it youself, add the following script... Then, when the box/logo is touched, the script gives the landmark contained in its contents.. to the toucher.

This script will work... make you box, add the script, make sure the script 'running' checkbox is checked, add a landmark to the contents.

CODE

default {
touch_start(integer total_number) {
llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_LANDMARK, 0));
}
}
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
08-25-2006 00:52
You can also use llMapDestination, which will open the map for them with the red dot in the right place. Probably not so friendly for an automatic giver mind!

llTeleportAgent has been floated as an idea for a while... not sure when/if it wil appear though.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Adam Turk
Registered User
Join date: 24 Aug 2006
Posts: 44
08-25-2006 06:59
thank you but maybe i need to b more specific. I would like a code that does that except is there a way to make the destination like a variable. I would like to make it so i could have a store put the box in with the logo and I want to be able to like rotate the logo and destination accordingly. So like it would randomly switch between say 5 places.
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
08-25-2006 07:58
you would want to use if statements for that

example
CODE


if (texture == "place A")
{ give card for place A
}
if (texture == "place B")
{ Give card for place B
}




something like that should work... you could also either have them rotate based on an order, or randomize the texture that is showing.
Adam Turk
Registered User
Join date: 24 Aug 2006
Posts: 44
08-25-2006 09:31
how do you randomize something?
Jason Foo
Old Timer
Join date: 6 Feb 2004
Posts: 105
08-25-2006 09:54
From: Adam Turk
how do you randomize something?


float randBetween(float min, float max)
{
return llFrand(max - min) + min;
}

for more information on scripting, visit the wikki at www.secondlife.com/badgeo
_____________________
If my doctor told me I had only six minutes to live, I wouldn't brood. I'd type a little faster.