Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

An addition to the changed() event that will help buyers and sellers!

Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
01-30-2004 19:28
Hola everyone!

I propose an addition to the changed event: CHANGED_OWNER.

This will be triggered when the object is bought, given, or taken. I think this should eliminate some chaos reguarding listen() events staying resident during sales, and help clean up scripts that check for owner-change.

Currently, if I dont want to completely reset my script, I have to litter my script with ownerValidate() functions.

==Chris
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
01-30-2004 19:54
Good idea, I like it, but when *exactly* would it be triggered? Would it be triggered before the item goes into the buyers inventory? Or the first time they bring it out?
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
01-30-2004 21:36
It should be triggered immediately when the script is first able to 'notice' that llGetOwner() wasn't the same as last (minute, second, year)'s llGetOwner().

Which means, probobly, when the user first takes it out of inventory. But, not always, in the case of purchasing the orginal of an object.
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
02-04-2004 11:55
CODE

key gLastOwner = NULL_KEY

default{
state_entry(){
gLastOwner = llGetOwner();
}
on_rez(integer n){
if(gLastOwner != llGetOwner()){
llResetScript();
}
}
}
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
02-04-2004 17:09
Heh, Kex, please read my last reply in full :p

The owner of an object doesnt just change on_rez().