Hi everyone I created a trap with selected victim menu using llDialog but obviously more than 24 characters avatar go back to script error
I just want some help with my script to not detect long avatar name
Can you help me please ? this is the script
string victim;
key target;
default
{
state_entry()
{
llListen(6666,"","" ,"");
}
on_rez(integer start_param)
{
vector here = llGetPos();
llSetText("touch me", <1,0,0>, 1.0);
llTargetOmega(<0,0,0>,0,0);
}
on_rez(integer start_param)
{
llSensor("",NULL_KEY,AGENT,512,PI);
}
no_sensor()
{
llSay(0,"cant find targets");
}
sensor(integer num)
{
list targets;
integer i;
if(num > 12)
num = 12;
for(i=0;i<num;i++)
{
targets += [llDetectedName(i)];
}
llDialog(llGetOwner(),"Select your target",targets,6666);
}
listen(integer channel, string name, key id, string message)
{
victim = message;
state stalking;
}
}
state stalking
{
state_entry()
{
llSetText("", <0,0,0>, 1.0);
llSensorRepeat(victim,NULL_KEY,AGENT,512,PI,0.1);
}
sensor(integer num)
{
llSetPos(llDetectedPos(0) + <0, 0, -2> );
}
}