Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Attach on touch detach on chat string.

Lucius Obviate
Evil Incarnate
Join date: 5 Dec 2006
Posts: 15
02-15-2007 18:58
I need to know if it is possible first to attach an object on touch that does not belong to the user touching it and secondly if it is possible to detach it based up on a static string of text in channel 0.

We are currently trying to script a capture the flag game and this is the method we are hoping to use to do it.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-16-2007 01:12
From: Lucius Obviate
I need to know if it is possible first to attach an object on touch that does not belong to the user touching it and secondly if it is possible to detach it based up on a static string of text in channel 0.

We are currently trying to script a capture the flag game and this is the method we are hoping to use to do it.



You cannot attach objects you dont own.
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-16-2007 02:25
I can't remember... what about group-owned objects?

Probably scripted attachments that have the flag invisible when a specific player doesn't have it would work better though.
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
02-16-2007 02:57
You could maybe do it this way -

When the flag standing at the base is touched, it does a give inventory of an object called "flag", and then dies.

The player with the flag then has to attach it manually.

I take it you then want someone to come and cause the flag carrier to drop the flag by saying something at close range. So you would have a listener in the carried flag. If it hears the drop command, it uses a sensor to check that the person saying "drop" is within permitted distance. If so, it sends a message to a base unit somewhere and then dies. The base unit then rezzes a new flag at the base.
Marine Kelley
Your cutest PITA
Join date: 19 Nov 2006
Posts: 111
02-16-2007 04:25
Maybe set it For Sale for L$0 and let others Buy it (for free then). In your script, do a llAttachToAvatar (N) in the changed () event, matching the change with CHANGED_OWNER and your object should attach itself automatically (though not sure with permissions)
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-16-2007 04:39
If this is for a shmup, I really would suggest giving everyone in the game a scripted attachment and handling it that way. Don't want to be faffing about with dialogues in a fire-fight.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-16-2007 05:13
The problem with any manual attachment will be the person could 'forget' to attach it and then just wander back to camp and then 'remember' it..

My suggestion would be to make the flag a follower object, i.e. when the avatar gets within 2m (for instance) and touches the object, have it wake up and 'attach' itself by following then 2m above their head or something similar?
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-16-2007 05:16
From: Newgate Ludd
The problem with any manual attachment will be the person could 'forget' to attach it and then just wander back to camp and then 'remember' it..

My suggestion would be to make the flag a follower object, i.e. when the avatar gets within 2m (for instance) and touches the object, have it wake up and 'attach' itself by following then 2m above their head or something similar?

That'd work. Don't use physical movement though, or you'll have problems with it getting stuck on scenery.
Dustin Widget
Script Monkey for hire
Join date: 15 Feb 2006
Posts: 101
02-16-2007 08:43
If anyone is familiar with UT2004, the colored rings around the person with the "ball" would be perfect for this.