Jump to content

Kira Summerwind

Resident
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Kira Summerwind

  1. Wow, that's pretty handy! Runs perfectly fine now, Thank you
  2. Happy (slightly belated) New Year, everyone. I currently try to set up communications between a prim attached to the user's body and a HUD. So basically an integer in the HUD that switches whenever the prim gets attached/detached. attach(key attached){ if (attached == NULL_KEY) // Object has been detached { llSay(-888,"Object Off"); } else // Object has been attached { llSay(-888,"Object On"); } listen(integer channel, string name, key id, string message) { if (llGetOwnerKey(id) == llGetOwner()){ if(message == "Object Off"){ state = 0; llSay(0,"You put the object off."); } if(message == "Object On"){ state = 1; llSay(0,"You put the object on."); } } } I check the OwnerKey to prevent everyone in range with the same items doing the same command as the user. The trouble is that the prim-key at the detaching-message is NULL and can't be used for the Ownercheck. Now I kind of hit a dead-end. I already considered adding the key as a string + the command in the message but I wonder if there are simpler solutions. Is there another way to check if the prim belongs to someone without using the key or maybe an alternative to send the Detach-message? Thank you, Kira
×
×
  • Create New...