Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

100% damage upon bumping object script?

Bakari Xaris
Registered User
Join date: 21 Apr 2009
Posts: 2
10-26-2009 06:29
Is there a way to make a script so that when an avatar touches an object "such as a door" the avatar is dealt full damage and is killed/ teleported back home?
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-26-2009 06:35
That seems like a nasty thing to do, but there's always llTeleportAgentHome (http://wiki.secondlife.com/wiki/LlTeleportAgentHome). :rolleyes:
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-26-2009 06:50
If you actually want to "kill" the avatar on a damage-enabled parcel rather than just tp him or her home, you need to take a look at http://wiki.secondlife.com/wiki/LlSetDamage . As you will see, damage is only inflicted by a physical object with llSetDamage enabled striking the avatar (a bullet or an arrow, for example).

So touching the door won't do anything, but I guess it could trigger a booby trap that shoots something at the victim or drops something on his head or whatever. Then, if the object you drop on him is set to inflict 100% damage, he's had it.
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
10-26-2009 09:39
From: Innula Zenovka
If you actually want to "kill" the avatar on a damage-enabled parcel rather than just tp him or her home, you need to take a look at http://wiki.secondlife.com/wiki/LlSetDamage . As you will see, damage is only inflicted by a physical object with llSetDamage enabled striking the avatar (a bullet or an arrow, for example).

So touching the door won't do anything, but I guess it could trigger a booby trap that shoots something at the victim or drops something on his head or whatever. Then, if the object you drop on him is set to inflict 100% damage, he's had it.

In the Jessie sim there is an electric fence that 'kills' you and sends you home if you touch it, but your saying that's not so and that they must be using one of the two methods mentioned above?
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-26-2009 10:48
Well, the wiki says, of llSetDamage,
From: someone
Specification
For an avatar to take damage when the object collides with an avatar...
The object must be physical, and
The avatar must be on the land where "Safe (no damage)" is disabled.
When these preconditions are met, the avatar receives the damage, and the object will die without calling the collision events.
so unless the wiki is completely wrong, this fence must do something of the sort.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
10-26-2009 12:51
I made a landmine that teleports people home who step on it.

Never had any use for it tho.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-26-2009 15:22
From: Innula Zenovka
Well, the wiki says, of llSetDamage, so unless the wiki is completely wrong, this fence must do something of the sort.

Reading that, it looks like all they had to do was make the fence physical on damage enabled land. An avatar colliding with it should work the same as a physical object colliding with avatar. The fence would of course llDie, but would just have to be rezzed again. They might have even had an alpha block rezzed around the fence to act as the collision barrier/kill prim.

As far as the teleporting home. If my memory serves me, this happens automatically when you die from damage.

Have never played with it in world over the years thou as I was never interested in that sort of thing. (Now orbiting would be a different story ;))
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-26-2009 15:29
Here you go from the olddddddddddddddd wiki mirror under damage:

"Damage
On land parcels with the damage option enabled, avatars can be damaged and killed (which simply teleports them to their home location, similar to llTeleportAgentHome)."

"Damage is inflicted when the avatar collides with a physical object that has a damage percentage set (using llSetDamage)."
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-26-2009 15:41
Ah.. I think we are cross purposes. When the OP said, "touches an object," I took it as meaning "left clicks it" rather than "brushes against it". Because touches wouldn't trigger collision events, would they?

So I think, if you're trying to make a trap that kills someone when they try to open a door, you need to do something like make the door rez a physical object that collides with them (or with which they collide). I don't think just touching the door can be lethal, though it could, of course, teleport the victim home.
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
10-27-2009 02:19
I wasn't disagreeing I was just looking for clarification, thanks.