我有一个 LSL 脚本,它使用 llGiveInventory() 向用户提供对象。有没有办法让我的脚本知道用户是接受还是拒绝了该对象?
在我的查看器(Firestorm)中,当我接受给定的对象时,我可以看到一条消息:
“网格:测试用户拥有的 Primitive 给了你 Pizza。Primitive 位于 MyRegion <107.7737, 137.6579, 23.5>。
该消息甚至显示在对话日志中,因此它似乎显示为一条消息。我尝试在频道 0 和 DEBUG_CHANNEL 上收听,但都没有听到消息。
这是当前脚本:
string objName = "Pizza";
default {
state_entry() {
llListen(DEBUG_CHANNEL, "", NULL_KEY, "");
}
touch_start(integer num_detected) {
llGiveInventory(llDetectedKey(0), objName);
}
listen (integer channel, string name, key id, string message) {
llOwnerSay("Did you hear that? I heard " + message);
}
}