|
MariaBeatriz Beck
Registered User
Join date: 2 Aug 2007
Posts: 10
|
12-28-2007 23:36
Is anyway to detect when a notecard is saved inside a PRIM?
Application has a configuration notecard, user edit the notecard, save. I need to reload the configuration, will be like onsavenotecard event.
Thanks,
|
|
Whispering Hush
™
Join date: 20 Mar 2007
Posts: 277
|
12-29-2007 00:54
 look at CHANGED_INVENTORY. Whisper.
|
|
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
|
12-29-2007 01:48
When you read your notecard, save its key using llGetInventoryKey(notecard_name). Then when you get a changed(CHANGED_INVENTORY) event, you can compare the saved key of your note to the current key by again cailling llGetInventoryKey(notecard_name). If the key has changed, new contents have been saved over your old note. This check will save you from re-reading unless the note was actually changed. fragment: changed(integer change) { if (change & CHANGED_INVENTORY) if (saved_notekey != llGetInventoryKey("config note"  ) reload_notecard(); }
|