Jump to content

How do I automatically Trigger a Touch Action


Malestorm1488303118
 Share

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

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

Recommended Posts

I have a script that needs to automatically trigger a touch action.   After the user has specified some information and the script has selected the product that is best for him, I want to automatically bring up a dialog box... in this case it is a Payment, so he can automatically proceed with purchasing the item, without having to re-click the main prim.

Any assistance would be GREATLY appreciate!!!

Link to comment
Share on other sites

As far as I understand the situation, the customer clicks the vendor to set some options. If you want to trigger a ayment, I'm afraid, you have to set the click action (by using llSetClickAction) so the customer gets the payment dialog on the next left click (of course you can tell them to do so in chat or IM) or they have to right click to get the pie menue (which isn't a pie in v2 anymore).

Link to comment
Share on other sites

Why do you need it to be a touch-action ? After your script collected all the needed information just add the commands you now have in the touch event right thereafter.

If the touch_event is in another script of the same prim then you end up with using messaging function like llSay, llListen or Linked Messages...

Link to comment
Share on other sites

  • 2 years later...

Hi Monti,

 

Technically speaking he wants to tigger a Pay Action!

I am in the same situation and have been looking for a solution almost everywhere!

 

What do you mean by > After your script collected all the needed information just add the commands you now have in the touch event right thereafter.

 

In this scenario, Malestorm and I want to >

1. On click display a dialog box with Items to be selected

2. Once the item is selected by clicking on the corresponging button, trigger a pay action. The ITem to give & price will be determined from the user input (button selected).

 

Is there a way to trigger a Pay Action with Code? Instead of setting the default prim click action to Pay ???

 

 

Thanks

FS

 

 

 

Link to comment
Share on other sites

llSetClickAction(CLICK_ACTION_PAY) .  Put it in the state_entry event and any click is interpreted as a trigger for a money event.  It's the same thing as using the pull-down menu in the Generakl page of your Edit tool to set PAY as the default click action.  Of course, if you intend to also have some other click action available in your script as well (like CLICK_ACTION_TOUCH), then you'll have to provide some way to change it. How is the script going to know to change unless ... you click it?

Link to comment
Share on other sites

No, I understand what you want to do: you want to process a touch event, and then make the script pop up a pay dialog, and there's no way to do that.

That's because scripts cannot generate pay dialogs -- only the user's direct click in a "pay" context can do that -- and I imagine the reason is to prevent scripts from scamming people by popping up those dialogs unexpectedly.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3973 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...