Malestorm1488303118 Posted April 15, 2011 Share Posted April 15, 2011 Hi Folks -- I have two specific questions about triggering a pay action and activating scripts.But first some background: I have a store with very low prims and could not find an off the self solution that met my needs. The clothes in my shop have many color options and I cannot afford prim-wise for each color option to be a separate prim with separate pay logic.So, I built this really neat touch pad that can be linked to a normal vendor prim and stretched over color options. You specify the dimensions of the option array to it and it communicates back when someone touches one of the colors. The benefit of the touchpad is that it hides all the complex math logic away and is very simple to use. So as an example, this texture on my main vender prim as color options. I can stretch the invisible touchpad over the color option, specify their array dimensions, and get back the one selected in my main vendor prim.Problem 1) I communicate from the touchpad to the main vendor prim when someone touches an array cell / button in the the touchpad. I would like to automatically trigger a PAY action in the main prim using the product that was touched. Is this possible and how? Problem 2) Every now and then it seems like the script in touchpad prim stops running on its own. Is there any way to automatically start it running again? Can the Main prim activate / reset a script in another prim? (as I see how it is done in the same prim). If I add a Touch_Start event to the main vendor prim, for example to provide a information notecard, then the main prims touch even completely override the touch sensitivity / events in the the touchpad prim. How can I keep the sensitivity of the touch sensitivity of the Touchpad?Many Many thanks for your help as I am sort of stuck. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 16, 2011 Share Posted April 16, 2011 Problem 1) I communicate from the touchpad to the main vendor prim when someone touches an array cell / button in the the touchpad. I would like to automatically trigger a PAY action in the main prim using the product that was touched. Is this possible and how? You'll have to modify the main script to do it. Basically, you can change the click action response to a touch event with llSetClickAction. When I do that in a vendor, I usually let the triggering action that enables CLICK_ACTION_PAY also trigger a state change in the script so that the vendor locks out touches by anyone except the actual buyer until the purchase is made (or until a timer cancels the action and returns the vendor script to state default and CLICK_ACTION_TOUCH). ETA: To be clear, the touchpad script needs to send the main script a message telling it to llSetClickAction and change state. At the same time, it should also send the buyer a note to let her know how to complete the purchase. Otherwise, you'll have buyers clicking in vain on the touchpad. Problem 2) Every now and then it seems like the script in touchpad prim stops running on its own. Is there any way to automatically start it running again? Can the Main prim activate / reset a script in another prim? (as I see how it is done in the same prim). It's probably smartest to find out why the script stalls instead of dodging the question by providing a Reset function. If there's a flaw in your vendor, you need to know what it is, just for peace of mind. You can use llSetScriptState to start another script, and you can also use llResetOtherScript. You should study the restrictions on both, however, because they may be ineffective if, for example, the script has stalled because of a run-time error. You will also need to restart the script from within the sam prim, which may mean relaying the command through a slave script instead of sending it directly. If I add a Touch_Start event to the main vendor prim, for example to provide a information notecard, then the main prims touch even completely override the touch sensitivity / events in the the touchpad prim. How can I keep the sensitivity of the touch sensitivity of the Touchpad? See llPassTouches, which will work so long as the script is not in the root prim of the linkset. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.