Malestorm1488303118 Posted April 28, 2011 Share Posted April 28, 2011 I am working on another application but have come run into a common scriping limitation that I konw there must be a way around. In a script I need to tigger a SIT action from a prim that has already been touched, I know this can be done because I have found a product in the marketplace that does this, though it is not the application I need. Altenatively, it would also be OK if I could associate sit processing with a touch, becuase it is possible to pass a touch action (just not SIT, Pay, etc). Many Thanks in advance for your assistance. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 28, 2011 Share Posted April 28, 2011 I don't fully understand what you need. The fact that a prim has been touched does not mean you cannot trigger a sit from it. You e.g. have a touch/grab in one state of a script and a sit on the other - if it's this what you mean. Link to comment Share on other sites More sharing options...
Ixia Posted April 28, 2011 Share Posted April 28, 2011 Well you don't need a own state for a "sit". Maybe you mean changing click action? llSetClickAction.. Or do you mean he person sits after touching it (with no sit action)? that would require RLV then though Link to comment Share on other sites More sharing options...
Innula Zenovka Posted April 28, 2011 Share Posted April 28, 2011 Is this the sort of mechanism you mean? default{ state_entry(){ llSitTarget(<0.0,0.0,0.25>,ZERO_ROTATION);//need a sit target for the changed event in the next state to work llSetClickAction(CLICK_ACTION_TOUCH); } touch_start(integer total_number) { llSay(0,"Touched"); } touch_end(integer total_number) {//nb -- if you want to change states in a touch action, DONT use touch_start -- //if you do, the first touch action in the new state won't fire state next; }}state next{ state_entry() { llSetClickAction(CLICK_ACTION_SIT); } changed(integer change){ if(change & CHANGED_LINK){ if(llAvatarOnSitTarget()==NULL_KEY){//when someone gets up state default;//back to default } } }} ETA: If you do want to force sit people as part of a touch event, then you (and they) need RLV. Assuming you want it to work on anyone wearing an active RLV Relay rather than just the owner of the object, the basic syntax is integer rlvrc = -1812221819; //the channel, by convention, all rlv relays usestring arbitrary_indentifier = "sit"; //part of the rlv syntax -- doesn't do anything in this example but has to be theredefault{ state_entry(){ llSitTarget(<0.0,0.0,0.25>,ZERO_ROTATION);//need a sit target pr the RLV won't work } touch_start(integer total_number) { llSay(rlvrc,arbitrary_indentifier+","+(string)llDetectedKey(0)+",@sit:"+(string)llGetKey()+"=force"); }} The toucher's relay processes the rlv command and makes the toucher sit on the prim (which has to have a sit target). You can have other stuff happen either in the touch event or the changed event when the avatar sits. Link to comment Share on other sites More sharing options...
Malestorm1488303118 Posted April 28, 2011 Author Share Posted April 28, 2011 Sorry, I was trying to simplify my request to it's essence, but let me describe what I am trying to do. I have two prims. The main prim has transporter logic and a texture of a map of various locations in a sim. The child prim is an invisible grid that sits over the map. When touched, the child prim tells the main prim the area that has been touched. Now I would like the main script to be able to trigger a sit action so that the user can be teleported to requested location (without have to click again to transport). Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 28, 2011 Share Posted April 28, 2011 I think that there is now way to make the ava sit without a second click - basically the same answer as here Link to comment Share on other sites More sharing options...
Void Singer Posted April 28, 2011 Share Posted April 28, 2011 what you'll need to do is is have a sit target defined for the invisible prim, and have the transport logic in there. the calculations should be fast enough that the time it takes to figure out where to move to (or move the av to depending on the logic) is unnoticeable. this will limit you to methods that move the invisble prim, (set pos, warpPos, posJump, or physics like llMoveTotarget), or seting the avatars position as if they were a prim. 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