Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Allowing damage on damage enabled lands

ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
05-06-2007 09:02
I have created an object that attacks avatars that get to close, bumping and pushing them, that part works fine. I had help writing that part of the script, I think I understand it, but my scripting talents are very low level.

I want to enable this attack object to cause damage when the land is set to allow damage. That part which I added, copied from another script, is not working. Here is the script, any suggestions would be appreciated.

CODE

_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-07-2007 02:41
In the collision event you check avatar == agent and yet avatar is never set to anything?
Ultralite Soleil
Registered User
Join date: 31 Aug 2006
Posts: 108
05-07-2007 08:04
From: Newgate Ludd
In the collision event you check avatar == agent and yet avatar is never set to anything?

That's definitely a problem.

Question: since llSetDamage has no effect on no-damage land, why do you need the if (damage == TRUE) check at all? Just always do the llSetDamage.