2toe Bigboots Posted June 1, 2011 Share Posted June 1, 2011 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 More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 It would help a lot if you could paste the code that should show the menu when you click it - as far as I understand, it isa that that doesn't work - paste at least the touch event Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 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 More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 Thank you for posting - I couldn't see anything on first view. If you do it with an alt, how far exactely do you get (to check, insert some more llSay check points. Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 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 More sharing options...
Void Singer Posted June 1, 2011 Share Posted June 1, 2011 it's your listen.... you tel it to listen to the current owner when you first install the script, and when you transfer the object, it's still listening to the same avatar.... include a rest when the owner changes Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 so i need to put a llreset in there? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 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 More sharing options...
Void Singer Posted June 1, 2011 Share Posted June 1, 2011 changed( integer vBitChg ){ if (CHANGED_OWNER & vBitChg){ llResetScript(); //-- in trace state you can change this to "state defalt;" }} needs to be in all states Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 grrr - I always miss the resetting of the listener since I do that by default Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 Thats not the hole script eather thats just what was asked for, it like this *Avi touch hud button (to rez) *Avi touches rezed object *menu display *choose name to attack *it attacks Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 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 More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 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;" } }} 1 Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 Now do i need to ad anything to the beginning like here string victim;key target;key sound = "";float min = 15;float max = 25;integer changed_pos = FALSE;vector start_pos = <128,128,10>;warpPos( vector destpos) Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 1, 2011 Share Posted June 1, 2011 you need everything you had there before - without the declarations of the variables and the function, the script won't compile 1 Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 Okay ill give it a shot thank you for the help ill reply in a few min to let you know how it goes Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 Awsome you are the best it worked like a charm, thats one for the keepers. I guess you do learn something new everyday Link to comment Share on other sites More sharing options...
wrable Amat Posted June 1, 2011 Share Posted June 1, 2011 integer vBitChg rolf Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 1, 2011 Author Share Posted June 1, 2011 whazt rofl ??????? Link to comment Share on other sites More sharing options...
Void Singer Posted June 1, 2011 Share Posted June 1, 2011 rofl = rolling on floor laughing.... why wrable thinks that's a funny variable... I dunno... Link to comment Share on other sites More sharing options...
Recommended Posts
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