Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Damage taken ?

Bonbon Musashi
Second Life Resident
Join date: 24 Nov 2004
Posts: 2
11-30-2004 05:23
I want to do some sort of monster that we can hunt down but i have a little problem with the damages :

How do you know when an object take damage (and how mush ?). I think it is the collision callback but i didn't see any llDetect* function related with the damage.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-30-2004 10:54
Play DarkLife :-)
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
11-30-2004 23:33
There is no internal support for object damage, so you need to have the object compute how much damage it should take in the "collision" (or better, the "collision_start";) event, and when scripting the object, decide how many hitpoints it starts with.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
Bonbon Musashi
Second Life Resident
Join date: 24 Nov 2004
Posts: 2
12-01-2004 01:39
Well since anyone can set the damage of his weapon, i was planing to do so but i can't know if the collision if made by a bullet or if it is made by anithing else (i can test if it is an script object but it is not really enough)
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
12-01-2004 13:55
You'd probably have to uniquely-name the bullets so that the target can recognize them on impact. Or, I suppose you could have the bullet tell the target how much damage it's doing, using a private chat channel. There're probably other methods, too. :)
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Sensual Casanova
Spoiled Brat
Join date: 28 Feb 2004
Posts: 4,807
12-01-2004 14:53
From: Strife Onizuka
Play DarkLife :-)


Good answer!

Located on the island, Navora :)