Jump to content

Fubar Constantine

Resident
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Fubar Constantine

  1. Thanks Rolig that also gave me an idea for a different invisible scary prim This one also works well but best to place any texture and prim placement before adding the scripts as it rezzes invisible //This Script is designed to start with an invisible prim //once it hears BOO anywhere in local in any case it makes itself visible integer listenHandle; default { state_entry() { //set a listener handle listenHandle = llListen(0, "", NULL_KEY, ""); } listen(integer channel, string name, key id, string message) { //search the string from start to finish for BOO within string if(llSubStringIndex(llToUpper(message), llToUpper("BOO")) !=-1) { // opaque llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); llSay(0, "I scare you" ); //name of object says I scare you llSetTimerEvent(5); //timer event 5 seconds llListenControl(listenHandle, FALSE); } } timer() { // transparent llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); llListenControl(listenHandle, TRUE); llSetTimerEvent(0.0); llResetScript(); } on_rez(integer start_param) { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); llResetScript(); } }
  2. Thanks I ended up with this that does what I wanted Type BOO in local and the prim rotates from flat on the ground to upright after 5 seconds it goes back integer listenHandle; integer intSwing =90; rotation rotSwing; vector vOffset; list l; vector v; rotation r; default { state_entry() { listenHandle = llListen(0, "", NULL_KEY, "BOO"); rotSwing = llEuler2Rot(<0.0,(float)intSwing*DEG_TO_RAD,0.0>); vector size = llGetScale(); vOffset = <(size.x*-0.5),(size.y*-0.5),(size.z*-0.5)>; } listen(integer channel, string name, key id, string message) { l = llGetPrimitiveParams([PRIM_POS_LOCAL,PRIM_ROT_LOCAL]); v = llList2Vector(l,0); r = llList2Rot(l,1); llSetPrimitiveParams([PRIM_POS_LOCAL,v+(vOffset-vOffset * rotSwing)*r,PRIM_ROT_LOCAL,rotSwing*r]); rotSwing.s*=-1; llSetTimerEvent(5); //timer event 10 seconds llListenControl(listenHandle, FALSE); } timer() { rotSwing = llEuler2Rot(<0.0,(float)360*DEG_TO_RAD,0.0>); llSetPrimitiveParams([PRIM_POS_LOCAL,v+(vOffset-vOffset * rotSwing)*r,PRIM_ROT_LOCAL,rotSwing*r]); llListenControl(listenHandle, TRUE); llSetTimerEvent(0.0); llResetScript(); } on_rez(integer start_param) { llResetScript(); } }
  3. I have recently wrote a script that almost does what I want except I want it to rotate from the bottom of the prim not the middle like it does Ideally I want a prim of a person ghost etc laying flat on the land then when it heres a word in local it pops up making itself visible I have the listening part working it rotates and resets but its rotating from the centre not the bottom any help would be greatly appreciated integer listenHandle; stop_listen_handle() { llListenControl(listenHandle, FALSE); } default { state_entry() { listenHandle = llListen(0, "", NULL_KEY, "Phen"); } listen(integer channel, string name, key id, string message) { //llOwnerSay("beep"); llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_ROTATION, llEuler2Rot(<0.0,PI/2,0.0>)*llGetRot()]); //llSetRot(llEuler2Rot(<0.0,PI/2,0.0>) * llGetRot()); // stop listening until script is reset llSetTimerEvent(5); //timer event 10 seconds stop_listen_handle(); } timer() { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_ROTATION, llEuler2Rot(<0.0,-PI/2,0.0>)*llGetRot()]); //llSetRot(llEuler2Rot(<0.0,PI/2,0.0>) * llGetRot()); llListenControl(listenHandle, TRUE); llSetTimerEvent(0.0); } on_rez(integer start_param) { llResetScript(); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } }
×
×
  • Create New...