Jump to content

OMG HELP


2toe Bigboots
 Share

You are about to reply to a thread that has been inactive for 4794 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

SO im making a hud and for some reason when i give it to my alt they cant use the functions. Its a attck hud that rezzes a object , click the object and a menu drops down then you choose a name to attack, but only my main the maker can use it why ive tryed everything. please help me. 

Link to comment
Share on other sites

Is this what you mean?

 

 

 

 touch_start(integer num_detected)    {            if (llDetectedKey(0) == llGetOwner())            {                llSensor("",NULL_KEY,AGENT,96,PI);            }    }

 

Or 

default{    state_entry()    {        llListen(6645,"",llGetOwner() ,"");    }    on_rez(integer start_param)    {        start_pos = llGetPos();        llPlaySound("LOLZ",1.0);        llOwnerSay("touch me to start scanning");    }    touch_start(integer num_detected)    {            if (llDetectedKey(0) == llGetOwner())            {                llSensor("",NULL_KEY,AGENT,96,PI);            }    }    no_sensor()    {        llSay(0,"waiting...");        state searching;    }    sensor(integer num)    {        list targets;        integer i;        if(num > 12)            num = 12;            for(i=0;i<num;i++)        {            targets += [llGetSubString(llDetectedName(i),0,23)];        }        llDialog(llGetOwner(),"select target to trace",targets,6645);    }    listen(integer channel, string name, key id, string message)    {        victim = message;        llOwnerSay("touch again to stop assimilation");        state tracing;    }}state tracing{        state_entry()        {                        llSetText("", <1,0,0>, 1.0);            llSetTimerEvent(5.0);            llSensorRepeat(victim,NULL_KEY,AGENT,96,PI,1.0);        }        no_sensor()        {            state searching;        }        sensor(integer num)        {            warpPos(llDetectedPos(0)  + <0, 0, 0> );        }        touch_start(integer num_detected)        {            if (llDetectedKey(0) == llGetOwner())            {                llOwnerSay("touch again to start scanning");                state default;            }        }        timer()        {            float time = min + llFrand(max - min);            llSetTimerEvent(time);        }}

 

Link to comment
Share on other sites

My alt can rez the object, then click on the object, the menu will show up with ppl names in range, i can click the menu goes away but it wont attack

if i give the script to my alt and let him build with it it works, so i think its in the permissions but idk

 

Link to comment
Share on other sites

Just to make sure I understand:

  • Ava touches object
  • script scans and showqsd dialog with avas near
  • when ava selects a name, script changes state and scans for victim
  • if victim is still there, warpPos(llDetectedPos(0) + <0, 0, 0> );
     happens

I can't see anything here that shouldn't work - but nothing really happens, either

Link to comment
Share on other sites

so would it look like this ?

default{    state_entry()    {        changed( integer vBitChg ){ //--with this added to intergers ?    if (CHANGED_OWNER & vBitChg){        llResetScript(); //-- in trace state you can change this to "state defalt;"    }}        llListen(6645,"",llGetOwner() ,"");    }    on_rez(integer start_param)    {        start_pos = llGetPos();        llPlaySound("LOLZ",1.0);        llOwnerSay("touch me to start scanning");    }    touch_start(integer num_detected)    {            if (llDetectedKey(0) == llGetOwner())            {                llSensor("",NULL_KEY,AGENT,96,PI);            }    }    no_sensor()    {        llSay(0,"waiting...");        state searching;    }    sensor(integer num)    {        list targets;        integer i;        if(num > 12)            num = 12;            for(i=0;i<num;i++)        {            targets += [llGetSubString(llDetectedName(i),0,23)];        }        llDialog(llGetOwner(),"select target to trace",targets,6645);    }    listen(integer channel, string name, key id, string message)    {        victim = message;        llOwnerSay("touch again to stop assimilation");        state tracing;    }}state tracing{        state_entry()        {                        llSetText("", <1,0,0>, 1.0);            llSetTimerEvent(5.0);            llSensorRepeat(victim,NULL_KEY,AGENT,96,PI,1.0);        }        no_sensor()        {            state searching;        }        sensor(integer num)        {            warpPos(llDetectedPos(0)  + <0, 0, 0> );        }        touch_start(integer num_detected)        {            if (llDetectedKey(0) == llGetOwner())            {                llOwnerSay("touch again to start scanning");                state default;            }        }        timer()        {            float time = min + llFrand(max - min);            llSetTimerEvent(time);        }}

 OR is changed( integer vBitChg ) a new state at beggining ?

Link to comment
Share on other sites

Changed is an event and inside this event you check, if the change that happened was an owner change.

You should do that in both states

default{    state_entry()    {        llListen(6645,"",llGetOwner() ,"");    }    on_rez(integer start_param)    {        start_pos = llGetPos();        llPlaySound("LOLZ",1.0);        llOwnerSay("touch me to start scanning");    }    touch_start(integer num_detected)    {            if (llDetectedKey(0) == llGetOwner())            {                llSensor("",NULL_KEY,AGENT,96,PI);            }    }    no_sensor()    {        llSay(0,"waiting...");        state searching;    }    sensor(integer num)    {        list targets;        integer i;        if(num > 12)            num = 12;            for(i=0;i<num;i++)        {            targets += [llGetSubString(llDetectedName(i),0,23)];        }        llDialog(llGetOwner(),"select target to trace",targets,6645);    }    listen(integer channel, string name, key id, string message)    {        victim = message;        llOwnerSay("touch again to stop assimilation");		state tracing;	}	changed( integer vBitChg ) { //--with this added to intergers ?		if (CHANGED_OWNER & vBitChg) {			llResetScript(); //-- in trace state you can change this to "state defalt;"		}    }}state tracing{        state_entry()        {                        llSetText("", <1,0,0>, 1.0);            llSetTimerEvent(5.0);            llSensorRepeat(victim,NULL_KEY,AGENT,96,PI,1.0);        }        no_sensor()        {            state searching;        }        sensor(integer num)        {            warpPos(llDetectedPos(0)  + <0, 0, 0> );        }        touch_start(integer num_detected)        {            if (llDetectedKey(0) == llGetOwner())            {                llOwnerSay("touch again to start scanning");                state default;            }        }        timer()        {            float time = min + llFrand(max - min);            llSetTimerEvent(time);	}	changed( integer vBitChg ){ //--with this added to intergers ?		if (CHANGED_OWNER & vBitChg) {			llResetScript(); //-- in trace state you can change this to "state defalt;"		}    }}

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4794 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...