xQUAKEx
-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by xQUAKEx
-
-
Hello All,
I am the type or person that cuts up other scripts and mashes them together from the lack of scripting skills.
I have a current issue with this mod that I can'y figure out.
It is an easter egg money giver, for group members and the user needs to be within range.
However i can't squeeze a llDie() into it to kill the objece once the money is collected.
If any one would be so kind to help it would be greatly appreciated.
Here is what I have.
// Minimum Distance Touch
integer limit = 4; //in meters
key id;
integer amount = 1; // amount to give
default
{
on_rez( integer param )
{
llResetScript();
}
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}
touch_start(integer total_number)
{
id = llDetectedKey(0);
integer number = 0;
vector mypos = llGetPos();
vector yourpos = llList2Vector(llGetObjectDetails(llDetectedKey(0), [OBJECT_POS]), 0);
if ((llAbs((integer)(yourpos.x-mypos.x)) > limit) || (llAbs((integer)(yourpos.y-mypos.y)) > limit) || (llAbs((integer)(yourpos.z-mypos.z)) > limit))
{
//avatar is too far away
llInstantMessage(llDetectedKey(0), "You are too far away. Move closer and touch again.");
}
else
{
if (llDetectedGroup(number))
llGiveMoney(id, amount);
else
llSay(0, "Wrong active group!");
}
}
}
What am I doing wrong?
in LSL Scripting
Posted
I want to thank you so much for your help, Works perfectly!
I have so many issues at times with opening and closing and then the elese statement sometimes throws me .. i know, such a noob.
Have a great day / night